2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-empty7.C
blobf491994a1fed1a7f6fdd60dd075a086f7e4fe51b
1 // PR c++/61959
2 // { dg-do compile { target c++11 } }
4 template <class Coord> struct BasePoint
6   Coord x, y;
7   constexpr BasePoint (Coord, Coord) : x (0), y (0) {}
8 };
9 template <class T> struct BaseCoord
11   int value;
12   constexpr BaseCoord (T) : value (1) {}
14 template <class units> struct IntCoordTyped : BaseCoord<int>, units
16   typedef BaseCoord Super;
17   constexpr IntCoordTyped (int) : Super (0) {}
19 template <class units>
20 struct IntPointTyped : BasePoint<IntCoordTyped<units> >, units
22   typedef BasePoint<IntCoordTyped<units> > Super;
23   constexpr IntPointTyped (int, int) : Super (0, 0) {}
25 struct A
28 IntPointTyped<A> a (0, 0);