Clang Project

clang_source_code/test/CXX/concepts-ts/dcl.dcl/dcl.spec/dcl.spec.concept/p6.cpp
1// RUN:  %clang_cc1 -std=c++14 -fconcepts-ts -x c++ -verify %s
2
3template<typename T>
4concept bool vc { true };
5
6template<typename T>
7struct B { typedef bool Boolean; };
8
9template<int N>
10B<void>::Boolean concept vctb(!0);
11
12template<typename T>
13concept const bool vctc { true }; // expected-error {{declared type of variable concept must be 'bool'}}
14
15template<typename T>
16concept int vcti { 5 }; // expected-error {{declared type of variable concept must be 'bool'}}
17
18template<typename T>
19concept float vctf { 5.5 }; // expected-error {{declared type of variable concept must be 'bool'}}
20
21template<typename T>
22concept auto vcta { true }; // expected-error {{declared type of variable concept must be 'bool'}}
23
24template<typename T>
25concept decltype(auto) vctd { true }; // expected-error {{declared type of variable concept must be 'bool'}}
26