aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-template3.C
blob: f0ac2224af5b3c95aa8d2c7129953a5403a003d6 (plain)
1
2
3
4
5
6
7
8
9
// { dg-do compile { target c++11 } }

struct A { constexpr operator int() { return 42; } };

template<class T>
struct B {
  static const int versionConst = A();
  enum { versionEnum = versionConst };
};