diff --git a/libcxx/include/__flat_map/flat_map.h b/libcxx/include/__flat_map/flat_map.h index a0594ed9dc41..f5abfd098528 100644 --- a/libcxx/include/__flat_map/flat_map.h +++ b/libcxx/include/__flat_map/flat_map.h @@ -33,6 +33,7 @@ #include <__functional/invoke.h> #include <__functional/is_transparent.h> #include <__functional/operations.h> +#include <__fwd/memory.h> #include <__fwd/vector.h> #include <__iterator/concepts.h> #include <__iterator/distance.h> diff --git a/libcxx/include/__memory/allocator_traits.h b/libcxx/include/__memory/allocator_traits.h index 3180f5e3d542..7e964b764701 100644 --- a/libcxx/include/__memory/allocator_traits.h +++ b/libcxx/include/__memory/allocator_traits.h @@ -151,13 +151,13 @@ using __is_always_equal _LIBCPP_NODEBUG = // __allocator_traits_rebind template -struct __has_rebind_other : false_type {}; +inline const bool __has_rebind_other_v = false; template -struct __has_rebind_other<_Tp, _Up, __void_t::other> > : true_type {}; +inline const bool __has_rebind_other_v<_Tp, _Up, __void_t::other> > = true; -template ::value> +template > struct __allocator_traits_rebind { - static_assert(__has_rebind_other<_Tp, _Up>::value, "This allocator has to implement rebind"); + static_assert(__has_rebind_other_v<_Tp, _Up>, "This allocator has to implement rebind"); using type _LIBCPP_NODEBUG = typename _Tp::template rebind<_Up>::other; }; template