summaryrefslogtreecommitdiff
path: root/test/CXX/concepts-ts/dcl.dcl/dcl.spec/dcl.spec.concept/p5.cpp
blob: 69672ca8306315ce378dba615751d20bbd1985b5 (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
// RUN:  %clang_cc1 -std=c++14 -fconcepts-ts -x c++ -verify %s

template<typename T>
concept bool fcpv(void) { return true; }

template<typename T>
concept bool fcpi(int i = 0) { return true; } // expected-error {{function concept cannot have any parameters}}

template<typename... Ts>
concept bool fcpp(Ts... ts) { return true; } // expected-error {{function concept cannot have any parameters}}

template<typename T>
concept bool fcpva(...) { return true; } // expected-error {{function concept cannot have any parameters}}

template<typename T>
concept const bool fcrtc() { return true; } // expected-error {{declared return type of function concept must be 'bool'}}

template<typename T>
concept int fcrti() { return 5; } // expected-error {{declared return type of function concept must be 'bool'}}

template<typename T>
concept float fcrtf() { return 5.5; } // expected-error {{declared return type of function concept must be 'bool'}}

template<typename T>
concept decltype(auto) fcrtd(void) { return true; } // expected-error {{declared return type of function concept must be 'bool'}}