[haiku-development] Re: [haiku-development]

  • From: "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 17 Dec 2021 10:20:39 +0000

https://review.haiku-os.org/c/haiku/+/4479
These macros allow the creation of new APIs that need to build both on
C++11 and on C++98, without the need to duplicate everything in a #if
__cplusplus > 201103L block. The macros should not be applied to
existing APIs, as they will change the signature of functions.

The reason for adding this here, is to allow the conditional use of
new C++ features in changes in the core libs that build on both
platforms, for example to support things on the changeset below.

I am still not sure if this is a good idea. Having the classes behave
differently in C++98 and C++11 (or later) sounds like a nightmare to
document and use.

I would rather make the whole new APIs simply not available at all in
C++98. This makes things easier to understand. And no one should be
writing new apps in C++98 anyway, right?

-- 
Adrien.


Other related posts: