@@ -15,15 +15,15 @@ struct CCloner
1515 struct CHelper
1616 {
1717 template <bool a>
18- IC static void clone (const T& _1, T& _2)
18+ IC static void clone (std:: enable_if_t <!a, const T&> _1, T& _2)
1919 {
2020 _2 = _1;
2121 }
2222
23- template <>
24- IC static void clone< true >( const T& _1, T& _2)
23+ template <bool a >
24+ IC static void clone (std:: enable_if_t <a, const T&> _1, T& _2)
2525 {
26- _2 = new object_type_traits::remove_pointer<T>::type (*_1);
26+ _2 = new typename object_type_traits::remove_pointer<T>::type (*_1);
2727 CCloner::clone (*_1, *_2);
2828 }
2929 };
@@ -34,18 +34,18 @@ struct CCloner
3434 template <typename T1, typename T2>
3535 IC static void clone (const std::pair<T1, T2>& _1, std::pair<T1, T2>& _2)
3636 {
37- clone (const_cast <object_type_traits::remove_const<T1>::type&>(_1.first ),
38- const_cast <object_type_traits::remove_const<T1>::type&>(_2.first ));
37+ clone (const_cast <typename object_type_traits::remove_const<T1>::type&>(_1.first ),
38+ const_cast <typename object_type_traits::remove_const<T1>::type&>(_2.first ));
3939 clone (_1.second , _2.second );
4040 }
4141
4242 template <typename T, int size>
4343 IC static void clone (const svector<T, size>& _1, svector<T, size>& _2)
4444 {
4545 _2.resize (_1.size ());
46- svector<T, size>::iterator J = _2.begin ();
47- svector<T, size>::const_iterator I = _1.begin ();
48- svector<T, size>::const_iterator E = _1.end ();
46+ typename svector<T, size>::iterator J = _2.begin ();
47+ typename svector<T, size>::const_iterator I = _1.begin ();
48+ typename svector<T, size>::const_iterator E = _1.end ();
4949 for (; I != E; ++I, ++J)
5050 clone (*I, *J);
5151 }
@@ -64,7 +64,7 @@ struct CCloner
6464
6565 for (; !_2.empty (); _2.pop ())
6666 {
67- std::queue<T1, T2>::value_type t;
67+ typename std::queue<T1, T2>::value_type t;
6868 CCloner::clone (_2.front (), t);
6969 __2.push (t);
7070 }
@@ -84,7 +84,7 @@ struct CCloner
8484
8585 for (; !_2.empty (); _2.pop ())
8686 {
87- T1<T2, T3>::value_type t;
87+ typename T1<T2, T3>::value_type t;
8888 CCloner::clone (_2.top (), t);
8989 __2.push (t);
9090 }
@@ -104,7 +104,7 @@ struct CCloner
104104
105105 for (; !_2.empty (); _2.pop ())
106106 {
107- T1<T2, T3, T4>::value_type t;
107+ typename T1<T2, T3, T4>::value_type t;
108108 CCloner::clone (_2.top (), t);
109109 __2.push (t);
110110 }
@@ -131,7 +131,7 @@ struct CCloner
131131 }
132132
133133 template <typename T1, typename T2>
134- IC static void add (T1& data, typename T2& value)
134+ IC static void add (T1& data, T2& value)
135135 {
136136 data.insert (value);
137137 }
@@ -140,11 +140,11 @@ struct CCloner
140140 IC static void clone (const T& _1, T& _2)
141141 {
142142 _2.clear ();
143- T::const_iterator I = _1.begin ();
144- T::const_iterator E = _1.end ();
143+ typename T::const_iterator I = _1.begin ();
144+ typename T::const_iterator E = _1.end ();
145145 for (; I != E; ++I)
146146 {
147- T::value_type t;
147+ typename T::value_type t;
148148 CCloner::clone (*I, t);
149149 add (_2, t);
150150 }
@@ -155,13 +155,13 @@ struct CCloner
155155 struct CHelper4
156156 {
157157 template <bool a>
158- IC static void clone (const T& _1, T& _2)
158+ IC static void clone (std:: enable_if_t <!a, const T&> _1, T& _2)
159159 {
160- CHelper<T>::clone<object_type_traits::is_pointer<T>::value>(_1, _2);
160+ CHelper<T>::template clone<object_type_traits::is_pointer<T>::value>(_1, _2);
161161 }
162162
163- template <>
164- IC static void clone< true >( const T& _1, T& _2)
163+ template <bool a >
164+ IC static void clone (std:: enable_if_t <a, const T&> _1, T& _2)
165165 {
166166 CHelper3::clone (_1, _2);
167167 }
@@ -170,7 +170,7 @@ struct CCloner
170170 template <typename T>
171171 IC static void clone (const T& _1, T& _2)
172172 {
173- CHelper4<T>::clone<object_type_traits::is_stl_container<T>::value>(_1, _2);
173+ CHelper4<T>::template clone<object_type_traits::is_stl_container<T>::value>(_1, _2);
174174 }
175175};
176176
0 commit comments