1 /* { dg-do compile } */
3 namespace std __attribute__ ((__visibility__ ("default"))) {
4 template<typename _Tp> class new_allocator { };
5 template<typename _Tp> class allocator: public new_allocator<_Tp> { };
6 template<typename _Tp, typename _Alloc> struct _Vector_base { };
7 template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
8 class vector : protected _Vector_base<_Tp, _Alloc> { };
10 template<int Dim> class Vector { };
11 enum CenteringType { VertexType, EdgeType, FaceType, CellType };
12 enum ContinuityType { XDim = 1, YDim = XDim << 1, ZDim = YDim << 1 };
13 template <int Dim> class Centering {
15 typedef Vector<Dim> Position;
16 typedef std::vector<Position> Positions;
17 Centering(const Positions &positions);
18 Positions positions_m;
20 template <int Dim> class CanonicalCentering {
22 template <class T> static T combine(const T &op1, const T &op2);
23 static Centering<Dim>*** centering_table_m;
25 template <int Dim> CanonicalCentering<Dim>::CanonicalCentering()
27 typename Centering<Dim>::Positions positions[Dim][2];
32 centering_table_m[EdgeType][cont][YDim] = Centering<Dim>(positions[y][cont]);
33 centering_table_m[EdgeType][cont][XDim|YDim] = Centering<Dim>(combine(positions[x][cont], positions[y][cont]));
37 centering_table_m[EdgeType][cont][ZDim] = Centering<Dim>(positions[z][cont]);
38 centering_table_m[EdgeType][cont][XDim|ZDim] = Centering<Dim>(combine(positions[x][cont], positions[z][cont]));
41 template class CanonicalCentering<2>;