Possible fix for selection of incorrect method for serialization of vector<bool>

This commit is contained in:
Ivan Savenko
2016-10-30 11:42:53 +02:00
parent e13f98e38e
commit a1cca251ec
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -235,8 +235,8 @@ public:
range::copy(convData, data.begin());
}
template <typename T>
void load(std::vector<T> &data, typename std::enable_if < !std::is_same<T, bool >::value, int >::type = 0)
template <typename T, typename std::enable_if < !std::is_same<T, bool >::value, int >::type = 0>
void load(std::vector<T> &data)
{
READ_CHECK_U32(length);
data.resize(length);
+1 -1
View File
@@ -250,7 +250,7 @@ public:
T *internalPtr = data.get();
save(internalPtr);
}
template <typename T>
template <typename T, typename std::enable_if < !std::is_same<T, bool >::value, int >::type = 0>
void save(const std::vector<T> &data)
{
ui32 length = data.size();