]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/g++.dg/cpp0x/variadic-ex8.C
PR c++/92590 - wrong handling of inherited default ctor.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / variadic-ex8.C
CommitLineData
4b2e63de 1// { dg-do compile { target c++11 } }
d6a85c8d
DG
2template<class> struct X { static const bool primary = true; };
3template<class R, class... ArgTypes> struct X<R(int, ArgTypes...)> {
4 static const bool primary = false;
5};
6template<class... Types> struct Y { static const bool primary = true; };
7template<class T, class... Types> struct Y<T, Types&...> {
8 static const bool primary = false;
9};
10
11static_assert (X<int>::primary, "uses primary template");
12static_assert (!X<int(int, float, double)>::primary,
13 "uses partial specialization");
14static_assert (X<int(float, int)>::primary, "uses primary template");
15static_assert (Y<>::primary, "uses primary template");
16static_assert (!Y<int&, float&, double&>::primary,
17 "uses partial specialization");
18static_assert (Y<int, float, double>::primary, "uses primary template");
This page took 7.675921 seconds and 5 git commands to generate.