@@ -18,14 +18,14 @@ struct CSaver
1818 struct CHelper1
1919 {
2020 template <bool a>
21- IC static void save_data (std::enable_if_t <!a> , const T& data, M& stream, const P& /* p*/ )
21+ IC static void save_data (std::enable_if_t <!a, const T&> data, M& stream, const P& /* p*/ )
2222 {
2323 static_assert (!std::is_polymorphic<T>::value, " Cannot save polymorphic classes as binary data." );
2424 stream.w (&data, sizeof (T));
2525 }
2626
2727 template <bool a>
28- IC static void save_data (std::enable_if_t <a> , const T& data, M& stream, const P& /* p*/ )
28+ IC static void save_data (std::enable_if_t <a, const T&> data, M& stream, const P& /* p*/ )
2929 {
3030 T* data1 = const_cast <T*>(&data);
3131 data1->save (stream);
@@ -36,13 +36,13 @@ struct CSaver
3636 struct CHelper
3737 {
3838 template <bool pointer>
39- IC static void save_data (std::enable_if_t <!pointer> , const T& data, M& stream, const P& p)
39+ IC static void save_data (std::enable_if_t <!pointer, const T&> data, M& stream, const P& p)
4040 {
4141 CHelper1<T>::template save_data<object_type_traits::is_base_and_derived<ISerializable, T>::value>(data, stream, p);
4242 }
4343
4444 template <bool pointer>
45- IC static void save_data (std::enable_if_t <pointer> , const T& data, M& stream, const P& p)
45+ IC static void save_data (std::enable_if_t <pointer, const T&> data, M& stream, const P& p)
4646 {
4747 CSaver<M, P>::save_data (*data, stream, p);
4848 }
0 commit comments