https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102925

--- Comment #2 from qingzhe huang <nickhuang99 at hotmail dot com> ---
I suspect this is related to template-specialization-related issue because if I
use original implementation of "std::convertible_to" to declare my concept
(https://en.cppreference.com/w/cpp/concepts/convertible_to), 

template <class From, class To>
concept convertible_to =
  std::is_convertible_v<From, To> &&
  requires {
    static_cast<To>(std::declval<From>());
  };


then it works. (https://www.godbolt.org/z/99eoToze3)
See this concept is not a specialization of concept "std::convertible_to"

template<class T>
concept IsLambda=std::is_convertible_v<T,decltype(+[]{})>
&& requires{
     static_cast<decltype(+[]{})>(std::declval<T>());
};

Reply via email to