blob: ec2e4b014d7763c9b9efc84961dfccee36302f3f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// 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>);
|