On Friday, 27 December 2019 18:24:12 UTC+2, Richard Damon wrote:
> On 12/26/19 6:20 AM, Öö Tiib wrote:
> > On Thursday, 26 December 2019 13:01:25 UTC+2, Öö Tiib wrote:
> >> On Thursday, 26 December 2019 02:55:04 UTC+2, Pavel wrote:
> >>> Alf P. Steinbach wrote:
> >>>> On 25.12.2019 23:28, Pavel wrote:
> >>>>
> >>>>> B. If an identifier starting with _ not followed by an uppercase letter
> >>>>> is used by C++ implementation, it should be used as a name in the global
> >>>>> namespace.
> >>>>
> >>>> ... or namespace `std`.
> >>> *that* is what does not seem to follow from anything.
> >>
> >> There standard has chosen to other way of reserving, the menace
> >> of undefined behavior when user touches namespace std in wrong
> >> way:
> >> "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. A program may add a template
> >> specialization for any standard library template to namespace std
> >> only if the declaration depends on a user-defined type and the
> >> specialization meets the standard library requirements for the original
> >> template and is not explicitly prohibited."
> >
> > Note that by your interpretation, Pavel, standard is violating itself:
> > <
https://en.cppreference.com/w/cpp/utility/functional/placeholders>
> >
>
> Those names are reserved for the Standard to use.
Nope. *All* *and* *every* name, including but not limited to plain and
pure profanities with and without underlines anywhere, in namespace std
or in namespaces within namespace std are reserved for the Implementation
to define or to declare by quoted above Word Of Standard. ;)
> There is absolutely
> nothing in the Standard that prohibit it from taking a particular name
> in that set and defining it for use by the user.
Sure, I totally disagree with interpretation of Paul. In fact the
placeholders I cited were as example of contradiction of his
claim B that those names may be only used by Implementation and
only in global namespace.
> In fact, that is one of
> the reason that in C, the 'true name' for the boolean type is _Bool, as
> that was a name that was reserved for the implementation, and thus
> should not legally have previously appeared in any user code, so no
> backwards breakage introducing it (many user applications had a type
> called bool defined in many different ways). It was only by including a
> specific header that the symbol bool got its now standard definition, so
> old programs could stay valid as they didn't include that header and new
> programs could include the header and get the nice name.
Yes but do not talk about what C does to those smug language lawyers of
C++ committee. Significant part of those would make the two languages
totally incompatible if only to give chance.
> Note the words, "unless otherwised specified", That section you
> reference specifies a particular set of symbols and how they can be used.
What section? I quoted first paragraph of [namespace.std] from C++17.