aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/g++.dg/concepts/pack-1.C31
-rw-r--r--gcc/testsuite/g++.dg/lookup/using53.C1
-rw-r--r--gcc/testsuite/g++.dg/template/error25.C2
3 files changed, 33 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/concepts/pack-1.C b/gcc/testsuite/g++.dg/concepts/pack-1.C
new file mode 100644
index 0000000..b4f2c36
--- /dev/null
+++ b/gcc/testsuite/g++.dg/concepts/pack-1.C
@@ -0,0 +1,31 @@
+// { dg-do compile { target c++17 } }
+// { dg-options "-fconcepts" }
+
+// distilled from <concepts>, via header units
+
+template<typename _ArgTypes>
+struct is_invocable;
+
+template<typename... _Args>
+concept invocable = is_invocable<_Args...>::value;
+
+template<typename _Is>
+requires invocable<_Is>
+class BUG;
+
+template<typename _Is>
+requires invocable<_Is>
+class BUG {}; // { dg-bogus "different constraints" }
+
+template<int> struct is_invocable_NT;
+
+template<int... Ints>
+concept invocable_NT = is_invocable_NT<Ints...>::value;
+
+template<int _Is>
+requires invocable_NT<_Is>
+class BUG_NT;
+
+template<int _Is>
+requires invocable_NT<_Is>
+class BUG_NT {};
diff --git a/gcc/testsuite/g++.dg/lookup/using53.C b/gcc/testsuite/g++.dg/lookup/using53.C
index 595612e..f9e59e6 100644
--- a/gcc/testsuite/g++.dg/lookup/using53.C
+++ b/gcc/testsuite/g++.dg/lookup/using53.C
@@ -43,6 +43,7 @@ template class DT<int>;
namespace N
{
int i;
+ enum bob {Q};
}
void
diff --git a/gcc/testsuite/g++.dg/template/error25.C b/gcc/testsuite/g++.dg/template/error25.C
index 8901157..77b59cd 100644
--- a/gcc/testsuite/g++.dg/template/error25.C
+++ b/gcc/testsuite/g++.dg/template/error25.C
@@ -12,5 +12,5 @@ extern void f2 ();
template<>
extern void f2<void> (); // { dg-error "explicit template specialization cannot have a storage class" }
-export template<class T> // { dg-warning "keyword 'export' not implemented" }
+export template<class T> // { dg-warning "keyword 'export'" }
static void* f3 ();