c++: Some additional tests

I created a few tests on the modules branch that are not actually
module-related.  Here they are.

	gcc/testsuite/
	* g++.dg/concepts/pack-1.C: New.
	* g++.dg/lookup/using53.C: Add an enum.
	* g++.dg/template/error25.C: Relax 'export' error check.
This commit is contained in:
Nathan Sidwell 2020-11-02 08:54:16 -08:00
parent 48a201e9bc
commit 0a07912f2d
3 changed files with 33 additions and 1 deletions

View file

@ -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 {};

View file

@ -43,6 +43,7 @@ template class DT<int>;
namespace N
{
int i;
enum bob {Q};
}
void

View file

@ -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 ();