[libcxx-commits] [PATCH] D126249: [libc++] Remove _LIBCPP_ALIGNOF

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 6 11:39:30 PDT 2022


philnik added a comment.

>>> - This breaks the symmetry between `_LIBCPP_PREFERRED_ALIGNOF` and `_LIBCPP_ALIGNOF`.
>>
>> There are exactly 3 uses of `_LIBCPP_PREFERRED_ALIGNOF`, all of which are in `<type_traits>`. I think removing the macro and adding a comment on these places is the better alternative.
>
> Can you upload a patch that does this before we decide whether to move forward with this patch?

This is  D127132 <https://reviews.llvm.org/D127132> now.

>> I know we don't want to break users, but I think we should treat C++03 as what it is: A relic of a bygone era and a burden nobody wants to keep.
>
> I agree that C++03 is a relic, and I agree that we want to get rid of it. However, I think you are underestimating how many users of it there are. For example, AppleClang still uses C++03 by default today because we've run into issues when flipping the default -- LLVM Clang uses C++14 AFAICT. It doesn't change much w.r.t. this patch, but I think it's important to be aware that a lot of users unfortunately still compile as C++03.

Can you tell me/do you know what problems there were changing the default to something newer than C++03 and when you tried it? I wasn't aware AppleClang still defaults to C++03.
It's absolutely possible that I'm underestimating how many people still compile in C++03 mode. Do you know of any statistics which language mode get used? How many people are just using it because it's the default on AppleClang and how many people would even notice the change? How many people are there that compile in C++03 mode for a good reason (i.e. would have to set `-std=c++03` if it weren't the default)? GCC defaults to C++17 and clang to C++14, so it's obviously not impossible to change the default language standard. Is the main reason we still support C++03 that AppleClang still defaults to it?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126249



More information about the libcxx-commits mailing list