comparison gcc/testsuite/g++.dg/concepts/fn-concept2.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 // { dg-options "-std=c++17 -fconcepts" } 1 // { dg-do compile { target c++17 } }
2 // { dg-options "-fconcepts" }
2 3
3 template<typename T> 4 template<typename T>
4 concept auto C1() { return 0; } // { dg-error "deduced return type" } 5 concept auto C1() { return 0; } // { dg-error "16:concept .concept auto C1\\(\\). declared with a deduced return type" }
5 6
6 template<typename T> 7 template<typename T>
7 concept int C2() { return 0; } // { dg-error "return type" } 8 concept int C2() { return 0; } // { dg-error "15:concept .concept int C2\\(\\). with non-.bool. return type .int." }
9
10 template<typename T>
11 concept bool C3(int) { return 0; } // { dg-error "16:concept .concept bool C3\\(int\\). declared with function parameters" }