diff --git a/libcxx/include/__flat_map/flat_map.h b/libcxx/include/__flat_map/flat_map.h index a0594ed9dc411..f5abfd0985280 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 2d9ab847e9f25..901093259e5ac 100644 --- a/libcxx/include/__memory/allocator_traits.h +++ b/libcxx/include/__memory/allocator_traits.h @@ -149,13 +149,13 @@ using __is_always_equal _LIBCPP_NODEBUG = // __allocator_traits_rebind _LIBCPP_SUPPRESS_DEPRECATED_PUSH 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