aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/pr39425.C
blob: d55f547e25350a3eb8edc959a275f8d367b4a4df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/39425
// { dg-do compile }

class a {

  template<unsigned int s>
    struct _rec {
      static const char size = _rec< (s >> 1) >::size;
    };

  template<>	// { dg-error "explicit" }
  struct _rec <0> {
    static const char size = 0;
  };

  static const unsigned int value = _rec < 1 >::size;

} // { dg-error "after class definition" }