Fix TypedVariant building with MSVC

This commit is contained in:
Jack Andersen 2019-10-18 15:31:54 -10:00
parent 3506ee1796
commit dfcad01c2f
3 changed files with 7 additions and 7 deletions

2
hecl/extern/athena vendored

@ -1 +1 @@
Subproject commit ee012692ba6981a5889d38e76e717e2cb0216e57
Subproject commit 03f9314a2a8305fee309b3d0137528914e95fcf2

2
hecl/extern/boo vendored

@ -1 +1 @@
Subproject commit 314563614e0e2e2a6f020a423096900e79220119
Subproject commit a7a02b0c5e4539c3a65f34b836e4072bb30d4428

View File

@ -207,7 +207,7 @@ private:
template <> \
inline void hecl::TypedVariantBigDNA<__VA_ARGS__>::Enumerate<athena::io::DNA<athena::Endian::Big>::Read>( \
typename Read::StreamT & r) { \
EnumType variant_type = {}; \
hecl::TypedVariant<__VA_ARGS__>::EnumType variant_type = {}; \
Do<athena::io::DNA<athena::Endian::Big>::Read>(athena::io::PropId("variant_type"sv), variant_type, r); \
static_cast<TypedVariant<__VA_ARGS__>&>(*this) = Build(variant_type); \
visit([&](auto& var) { var.read(r); }); \
@ -219,7 +219,7 @@ private:
typename Write::StreamT & w) { \
visit([&](auto& var) { \
using T = std::decay_t<decltype(var)>; \
EnumType variant_type = T::variant_type(); \
hecl::TypedVariant<__VA_ARGS__>::EnumType variant_type = T::variant_type(); \
Do<athena::io::DNA<athena::Endian::Big>::Write>(athena::io::PropId("variant_type"sv), variant_type, w); \
var.write(w); \
}); \
@ -231,7 +231,7 @@ private:
typename BinarySize::StreamT & sz) { \
visit([&](auto& var) { \
using T = std::decay_t<decltype(var)>; \
EnumType variant_type = T::variant_type(); \
hecl::TypedVariant<__VA_ARGS__>::EnumType variant_type = T::variant_type(); \
Do<athena::io::DNA<athena::Endian::Big>::BinarySize>(athena::io::PropId("variant_type"sv), variant_type, sz); \
var.binarySize(sz); \
}); \
@ -247,7 +247,7 @@ private:
template <> \
inline void hecl::TypedVariantBigDNA<__VA_ARGS__>::Enumerate<athena::io::DNA<athena::Endian::Big>::ReadYaml>( \
typename ReadYaml::StreamT & r) { \
EnumType variant_type = {}; \
hecl::TypedVariant<__VA_ARGS__>::EnumType variant_type = {}; \
Do<athena::io::DNA<athena::Endian::Big>::ReadYaml>(athena::io::PropId("variant_type"sv), variant_type, r); \
static_cast<TypedVariant<__VA_ARGS__>&>(*this) = Build(variant_type); \
visit([&](auto& var) { var.read(r); }); \
@ -259,7 +259,7 @@ private:
typename WriteYaml::StreamT & w) { \
visit([&](auto& var) { \
using T = std::decay_t<decltype(var)>; \
EnumType variant_type = T::variant_type(); \
hecl::TypedVariant<__VA_ARGS__>::EnumType variant_type = T::variant_type(); \
Do<athena::io::DNA<athena::Endian::Big>::WriteYaml>(athena::io::PropId("variant_type"sv), variant_type, w); \
var.write(w); \
}); \