[libcxx-commits] [PATCH] D131898: [libc++] Implement P0591R4 (Utility functions to implement uses-allocator construction)

Hui via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Sep 3 21:46:54 PDT 2022


huixie90 added a comment.

Almost LGTM. Just two small clarification questions



================
Comment at: libcxx/include/__memory/uses_allocator_construction.h:171
+_LIBCPP_HIDE_FROM_ABI constexpr auto __make_obj_using_allocator(const _Alloc& __alloc, _Args&&... __args)
+    -> decltype(std::make_from_tuple<_Type>(
+        std::__uses_allocator_construction_args<_Type>(__alloc, std::forward<_Args>(__args)...))) {
----------------
In your original version , this is doing sfinae, but now you’ve changed the use_allocator_constructution_args to static_assert in the function body.  Does this still do the things you want?


================
Comment at: libcxx/include/__memory/uses_allocator_construction.h:131
+template <class _Tp>
+constexpr bool __convertible_to_const_pair_ref =
+    decltype(__detail::__convertible_to_const_pair_ref_impl<_Tp>(0))::value;
----------------
huixie90 wrote:
> `inline`
question : do we need hidden from abi macro for inline constexpr variables 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131898/new/

https://reviews.llvm.org/D131898



More information about the libcxx-commits mailing list