[libcxx-commits] [PATCH] D145589: [libc++] Make std::allocator_arg and friends conforming in C++17

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 8 11:19:26 PST 2023


philnik added a comment.

In D145589#4178843 <https://reviews.llvm.org/D145589#4178843>, @Mordante wrote:

> In D145589#4178836 <https://reviews.llvm.org/D145589#4178836>, @philnik wrote:
>
>> In D145589#4178824 <https://reviews.llvm.org/D145589#4178824>, @Mordante wrote:
>>
>>> LGTM, but I really would like to use a helper macro over `#ifdef`s.
>>
>> Another option would be to just always mark them `inline`. Both clang and GCC support this as an extension.
>
> Really? I wasn't aware of that. In that case +1 for that solution.

I think the main problem with that approach is that it will be hard to only use extensions in the libc++ headers and not in the tests. We could probably add some magic into `_LIBCPP_BEGIN_NAMESPACE_STD` and `_LIBCPP_END_NAMESPACE_STD`, since we have 99% of our code in there, but Clang and GCC support different extension in some cases, making it potentially quite annoying to find out which ones are supported.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145589



More information about the libcxx-commits mailing list