2 // Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4 template<typename T> struct A
6 template<T> int foo(); // { dg-error "double" "" { target c++17_down } }
7 template<template<T> class> int bar(); // { dg-bogus {double[^\n]*\n[^\n]*C:7:[^\n]*double} "" { xfail c++17_down } }
8 // The above xfailed dg-bogus test means that we issue two errors
9 // for the invalid 'double' NTTP, and preferably we'd issue just one.
10 template<T> struct X; // { dg-error "double" "" { target c++17_down } }
14 A<double> a2; // { dg-message "required" "" { target c++17_down } }
16 template<typename T> struct B
18 template<double> int foo(); // { dg-error "double" "" { target c++17_down } }
19 template<template<double> class> int bar(); // { dg-error "double" "" { target c++17_down } }
20 template<double> struct X; // { dg-error "double" "" { target c++17_down } }
23 template<void> int foo(); // { dg-error "void" }
24 template<template<void> class> int bar(); // { dg-error "void" }
25 template<void> struct X; // { dg-error "void" }
27 template<typename T> struct C
29 template<T> int foo(); // { dg-error "double" "" { target c++17_down } }
32 template<typename T> int baz(T) { C<T> c; return 0;} // { dg-message "required" "" { target c++17_down } }
36 baz(1.2); // { dg-message "required" "" { target c++17_down } }