Skip to content

Commit e994c73

Browse files
committed
fix building object_saver.h on Windows
1 parent 17a8575 commit e994c73

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Common/object_saver.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)