blob: f28551443c36603e072badd6a8883f10e807e62a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// PR c++/66218
// { dg-options "-std=c++1z -fconcepts" }
#include <type_traits>
template <class T, class U>
concept bool Same =
std::is_same<T, U>::value;
template <class T>
concept bool C =
requires(T t) {
{ t } -> Same<T>;
};
template <class>
constexpr bool f() { return false; }
template <C>
constexpr bool f() { return true; }
static_assert(f<char>(), "");
static_assert(f<int>(), "");
static_assert(f<double>(), "");
int main() {}
|