summaryrefslogtreecommitdiff
path: root/src/CommonAPI/SerializableVariant.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/CommonAPI/SerializableVariant.hpp')
-rw-r--r--src/CommonAPI/SerializableVariant.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/CommonAPI/SerializableVariant.hpp b/src/CommonAPI/SerializableVariant.hpp
index febff2d..fe9a53d 100644
--- a/src/CommonAPI/SerializableVariant.hpp
+++ b/src/CommonAPI/SerializableVariant.hpp
@@ -175,7 +175,11 @@ public:
void operator()(const _Type&) {
_Type value;
inputStream_ >> value;
+#ifdef WIN32
+ lhs_.set<_Type>(std::move(value), false);
+#else
lhs_.Variant<_Types...>::template set<_Type>(std::move(value), false);
+#endif
}
private:
@@ -233,7 +237,11 @@ public:
template<typename _Type>
void operator()(const _Type& value) const {
+#ifdef WIN32
+ lhs_.set<_Type>(value, clear_);
+#else
lhs_.Variant<_Types...>::template set<_Type>(value, clear_);
+#endif
}
template<typename _Type>
@@ -453,7 +461,7 @@ const _Type & Variant<_Types...>::get() const {
if (cType == valueType_) {
return *(reinterpret_cast<const _Type *>(&valueStorage_));
} else {
-#ifdef __EXCEPTIONS
+#if defined(__EXCEPTIONS) || defined(WIN32)
std::bad_cast toThrow;
throw toThrow;
#else