diff --git a/include/strict_variant/variant_storage.hpp b/include/strict_variant/variant_storage.hpp index 467cc4c..ee86135 100644 --- a/include/strict_variant/variant_storage.hpp +++ b/include/strict_variant/variant_storage.hpp @@ -80,19 +80,20 @@ struct storage { /*** * Typed access which pierces recursive_wrapper if detail::false_ is passed + * "Internal" (non-piercing) access is achieved if detail::true_ is passed */ - template - value_t & get_value(const Internal &) & { + template + value_t & get_value(const detail::true_ &) & { return *reinterpret_cast *>(this->address()); } - template - const value_t & get_value(const Internal &) const & { + template + const value_t & get_value(const detail::true_ &) const & { return *reinterpret_cast *>(this->address()); } - template - value_t && get_value(const Internal &) && { + template + value_t && get_value(const detail::true_ &) && { return std::move(*reinterpret_cast *>(this->address())); }