Commit 7ca6a803 authored by Dominik Charousset's avatar Dominik Charousset

Work around weird static_assert in boost::variant

parent 2f11444c
......@@ -64,7 +64,14 @@ public:
inline T read() {
primitive_variant val{T()};
read_value(val);
return std::move(get<T>(val));
// works around the all-to-strict boost::strict_get of boost::variant
using result =
typename std::conditional<
std::is_same<T, char>::value,
uint8_t,
T
>::type;
return std::move(get<result>(val));
}
template <class T>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment