comparison gcc/testsuite/g++.dg/concepts/locations1.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 // { dg-do compile { target c++17 } }
2 // { dg-additional-options "-fconcepts" }
3
4 struct S
5 {
6 concept S(); // { dg-error "3:a constructor cannot be .concept." }
7 concept int s = 1; // { dg-error "3:non-static data member .s. declared .concept." }
8 concept void foo(); // { dg-error "3:a concept cannot be a member function" }
9 concept ~S(); // { dg-error "3:a destructor cannot be .concept." }
10 };
11
12 typedef concept int my_int; // { dg-error "9:.concept. cannot appear in a typedef declaration" }
13
14 void bar(concept int); // { dg-error "10:a parameter cannot be declared .concept." }
15
16 concept int i = 0; // { dg-error "1:a non-template variable cannot be .concept." }