|
Boost : |
Subject: Re: [boost] Boost and auto_ptr (was Boost 1.60.0 beta 1...)
From: Jonathan Wakely (jwakely.boost_at_[hidden])
Date: 2015-11-11 17:55:19
On 11 November 2015 at 22:42, Nevin Liber wrote:
> On 11 November 2015 at 15:08, Jonathan Wakely <jwakely.boost_at_[hidden]>
> wrote:
>
>> That doesn't mean implementors have to stop providing it, it only
>> means it is no longer defined by the standard.
>>
>
> I'm not convinced they can.
>
> Quoting [namespace.std]: "The behavior of a C++ program is undefined if
> it adds declarations or definitions to namespace std or to a namespace
> within namespace std unless otherwise specified."
>
> And there is no wording in diff.cpp14.depr] which otherwise specifies it.
>
> Or does this fall under it being UB, so vendors can define the behavior
> however they like? (Seems kind of wrong because we have a UB detector [aka
> constexpr] with defined semantics and are looking to define more of what
> happens with UB [contracts], but I digress...)
P005R2 proposes a new clause that allows implementations to keep using
names that used to be in the standard:
17.6.4.3.x Zombie names [zombie.names]
In namespace std, the following names are reserved for previous
standardization: auto_ptr, bind1st, bind2nd, binder1st, binder2nd,
mem_fun, mem_fun_ref, mem_fun_t,mem_fun1_t, mem_fun_ref_t,
mem_fun1_ref_t, const_mem_fun_t, const_mem_fun1_t,
const_mem_fun_ref_t, const_mem_fun1_ref_t, not1, not2,
unary_negate,binary_negate, ptr_fun, pointer_to_unary_function,
pointer_to_binary_function, random_shuffle, unary_function, and
binary_function.
It is unspecified whether function objects in the C++ standard library
additionally provide the following typedefs: result_type,
argument_type, first_argument_type, andsecond_argument_type.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk