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

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 7 11:08:48 PDT 2022


Mordante added a comment.

No real opinion on the patch.

In D126249#3561099 <https://reviews.llvm.org/D126249#3561099>, @philnik wrote:

>>> 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?

There's still code being actively developed in older language Standards, even C++98. Upgrading the newer Standards can be quite a bit of effort. This is even worse when code bases use `using namespace std;` in headers. (I've seen this in multiple code bases.)

So I fear we'll need to support C++03 for a long time (probably forever).

In last years Jetbrains developer Infographic 12% was still using C++98/03
https://www.jetbrains.com/lp/devecosystem-2021/cpp


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