Boost logo

Boost :

Subject: Re: [boost] [config] request for BOOST_NO_FWD_STD_DECLARATION
From: Christopher Jefferson (chris_at_[hidden])
Date: 2011-02-16 10:06:19

On 16 Feb 2011, at 14:57, Daniel James wrote:

> On 16 February 2011 14:49, Mathias Gaunard <mathias.gaunard_at_[hidden]> wrote:
>> The standard also gives the reference of what the declarations of the
>> classes of the standard library must be, and all those declarations are in
>> namespace std.
> There are people here who'll know better than me, but I believe the
> implementer only has to make the class behave as if it was defined in
> the same way as the standard definition. They don't have to match the
> declarations exactly. If the only way to detect this is by doing
> something non-standard (such as declaring in 'std') then it's legit.

i think you are right.

On a practical note, while I don't speak for the authors of libc++, or anyone else other than myself, inline namespaces seem to be the best way to tackle a major problem in C++, which is allowing multiple binary-incompatable versions of libraries to exist without horrible issues involving breaking the one definition rule.

Even if subtle readings of the standard turned out to forbid it, using inline namespaces to implement std:: is here to stay, and I expect it to get more popular as time goes by.


Boost list run by bdawes at, gregod at, cpdaniel at, john at