Boost logo

Boost :

Subject: Re: [boost] C++17 detection
From: Nevin Liber (nevin_at_[hidden])
Date: 2017-09-11 16:45:33


On Mon, Sep 11, 2017 at 10:37 AM, Robert Ramey via Boost <
boost_at_[hidden]> wrote:

> Because we only define things inside std that we are explicitly granted
>> permission to (such as specializations of specific stand library types).
>>
>
> Right. But why do "we" do this.

Because the standard says so. See [namespace.std]. When this is violated,
well, it's why we can't have nice things. As a user, well, you've invoked
undefined behavior.

The standard needs a place where it owns all the names.

> What problem might violating such a permission cause?

Ever wonder why there is no std::hash_map (with that spelling)? Because
vendors used to put their hash_map into namespace std, neither of which was
quite compatible with the unordered_map eventually shipped in C++11. It is
very deceiving to pretend you are part of the standard when you are not.

-- 
 Nevin ":-)" Liber  <mailto:nevin_at_[hidden]>  +1-847-691-1404

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk