blob: ec2e4b014d7763c9b9efc84961dfccee36302f3f [file] [log] [blame]
// PR c++/98611
// { dg-do compile { target c++20 } }
template <class T, class U>
concept IsSame = __is_same(T, U);
template <class T, template <class...> class _Class>
concept IsInstantiationOf = requires(T object) {
{ _Class{object} } -> IsSame<T>;
};
template <class T> struct Degrees {};
static_assert(IsInstantiationOf<Degrees<int>, Degrees>);
template <class T> struct NotDegrees {};
static_assert(!IsInstantiationOf<Degrees<int>, NotDegrees>);