@@ -223,6 +223,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp>
using __is_in_place_type = bool_constant<__is_in_place_type_v<_Tp>>;
+ template<typename>
+ inline constexpr bool __is_in_place_index_v = false;
+
+ template<size_t _Nm>
+ inline constexpr bool __is_in_place_index_v<in_place_index_t<_Nm>> = true;
+
#endif // C++17
#if _GLIBCXX_USE_BUILTIN_TRAIT(__type_pack_element)
@@ -1414,7 +1414,8 @@ namespace __variant
template<typename _Tp>
static constexpr bool __not_in_place_tag
- = !__is_in_place_tag<__remove_cvref_t<_Tp>>::value;
+ = !__is_in_place_type_v<__remove_cvref_t<_Tp>>
+ && !__is_in_place_index_v<__remove_cvref_t<_Tp>>;
public:
#if __cpp_concepts