summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-targ.C
blob: 0c8c73d2e1d059deb747452442b62047f760e2b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-options -std=c++0x }

struct A
{
  constexpr operator double() { return 1.0; }
};

template <int I>
struct B
{ };

constexpr A a { };
B<a> b;				// { dg-error "template argument|invalid type" }