Closed jfirebaugh closed 8 years ago
Consider the following:
using value = mapbox::util::variant<bool, uint64_t>; uint64_t u(1234); assert(value(u).is<uint64_t>()); // passes uint64_t& ur(u); assert(value(ur).is<uint64_t>()); // passes uint64_t const& ucr(u); assert(value(ucr).is<uint64_t>()); // fails, it's bool!
The last assertion should not fail.
cc @artemp @joto @springmeyer
@jfirebaugh - fixed and test added (b3a002d + c511b2f) In value_traits both reference and const specifier needs stripping to correctly calculate direct_type matching.
value_traits
direct_type
/cc @springmeyer @joto
Consider the following:
The last assertion should not fail.
cc @artemp @joto @springmeyer