File tree 1 file changed +14
-5
lines changed
1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -126,18 +126,27 @@ namespace internal
126
126
*/
127
127
class Iteration : public CustomHierarchy
128
128
{
129
- template <typename T, typename T_key, typename T_container>
130
- friend class Container ;
129
+ public:
130
+ using IterationIndex_t = uint64_t ;
131
+
132
+ /*
133
+ * Some old compilers have trouble with befriending the entire Container
134
+ * template here, so we restrict it
135
+ * to Container<Iteration, IterationIndex_t>, more is not needed anyway.
136
+ *
137
+ * E.g. on gcc-7:
138
+ * > error: specialization of 'openPMD::Container<openPMD::CustomHierarchy>'
139
+ * > after instantiation
140
+ * > friend class Container;
141
+ */
142
+ friend class Container <Iteration, IterationIndex_t>;
131
143
friend class Series ;
132
144
friend class WriteIterations ;
133
145
friend class SeriesIterator ;
134
146
135
- public:
136
147
Iteration (Iteration const &) = default ;
137
148
Iteration &operator =(Iteration const &) = default ;
138
149
139
- using IterationIndex_t = uint64_t ;
140
-
141
150
/* *
142
151
* @tparam T Floating point type of user-selected precision (e.g. float,
143
152
* double).
You can’t perform that action at this time.
0 commit comments