diff options
Diffstat (limited to 'libstdc++-v3/include/std/variant')
-rw-r--r-- | libstdc++-v3/include/std/variant | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libstdc++-v3/include/std/variant b/libstdc++-v3/include/std/variant index 7d93575..34ad3fd 100644 --- a/libstdc++-v3/include/std/variant +++ b/libstdc++-v3/include/std/variant @@ -85,6 +85,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using variant_alternative_t = typename variant_alternative<_Np, _Variant>::type; + template<size_t _Np, typename _Variant> + struct variant_alternative<_Np, const _Variant> + { using type = add_const_t<variant_alternative_t<_Np, _Variant>>; }; + + template<size_t _Np, typename _Variant> + struct variant_alternative<_Np, volatile _Variant> + { using type = add_volatile_t<variant_alternative_t<_Np, _Variant>>; }; + + template<size_t _Np, typename _Variant> + struct variant_alternative<_Np, const volatile _Variant> + { using type = add_cv_t<variant_alternative_t<_Np, _Variant>>; }; + constexpr size_t variant_npos = -1; _GLIBCXX_END_NAMESPACE_VERSION |