comparison gcc/testsuite/g++.dg/concepts/pr92804-1.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 // { dg-do compile { target c++17 } }
2 // { dg-options "-fconcepts" }
3
4 template<typename T>
5 concept foo = true; // { dg-message "declared here" }
6
7 template<typename T>
8 void bar(T t)
9 {
10 if constexpr (foo<T>::value) // { dg-error "17:concept-id .foo<T>. in nested-name-specifier" }
11 // { dg-error "expected|value" "" { target c++17 } .-1 }
12 {
13 }
14 }
15
16 int main()
17 {
18 bar(1);
19 }