aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/constant2.C
blob: f71e4f56a22eb4d3a70f0f29467467ca075ddb47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// PR c++/49896

template<class C>
class test {
 protected:
  static const int versionConst = 0x80000000;
  enum { versionEnum = versionConst };
 public:
  int getVersion();
};

template<class C>
int test<C>::getVersion() {
  return versionEnum;
}

class dummy_class {};

int main() {
  test<dummy_class> t;
  return t.getVersion();
}