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