1 2 // Support parsing of function concepts and variable concepts 3 4 // RUN: %clang_cc1 -std=c++14 -fconcepts-ts -x c++ -verify %s 5 6 template<typename T> concept bool C1 = true; 7 8 template<typename T> concept bool C2() { return true; } 9 10 template<typename T> 11 struct A { typedef bool Boolean; }; 12 13 template<int N> 14 A<void>::Boolean concept C3(!0); 15 16 template<typename T, int = 0> 17 concept auto C4(void) -> bool { return true; } 18 19 constexpr int One = 1; 20 21 template <typename> 22 static concept decltype(!0) C5 { bool(One) }; 23 24 template<typename T> concept concept bool C6 = true; // expected-warning {{duplicate 'concept' declaration specifier}} 25 26 template<typename T> concept concept bool C7() { return true; } // expected-warning {{duplicate 'concept' declaration specifier}} 27 28 template<concept T> concept bool D1 = true; // expected-error {{unknown type name 'T'}} 29