[PATCH] Fix gnu-versioned-namespace tr1 declaration
Jonathan Wakely
jwakely@redhat.com
Wed Dec 11 21:04:00 GMT 2019
On 11/12/19 21:25 +0100, François Dumont wrote:
>On 12/11/19 12:22 PM, Jonathan Wakely wrote:
>>On 11/12/19 11:16 +0000, Jonathan Wakely wrote:
>>>On 11/12/19 08:29 +0100, François Dumont wrote:
>>>>I plan to commit this tomorrow.
>>>>
>>>>Note that rather than just adding the missing
>>>>_GLIBCXX_[BEGIN,END]_VERSION_NAMESPACE I also move anonymous
>>>>namespace usage outside std namespace. Let me know if it was
>>>>intentional.
>>>
>>>It was intentional, why move it?
>>>
>>>Adding the BEGIN/END_VERSION macros is unnecessary. Those namespaces
>>>are inline, so std::random_device already refers to
>>>std::__8::random_device when the original declaration was in the
>>>versioned namespace.
>>>
>>>The only fix needed here seems to be qualifying std::isdigit (and
>>>strictly-speaking we should also include <cctype> to declare that).
>>
>>I was curious why that qualification is needed. Th problem is that
>><ctype.h> is being indirectly included by some other header, and so is
>><locale>, so the declarations visible are ::isdigit(int) and
>>std::__8::isdigit<CharT>(CharT, const locale&). Even after including
>><cctype> we still can't call it unqualified, because <cctype> doesn't
>>use the versioned namespace:
>
>Yes, this is the other patch I wanted to propose. Make sure that tr1
>namespace is always defined consistently with the version namespace.
>
>For instance 17_intro/headers/c++2011/parallel_mode.cc is failing at
>the moment with:
In the Venn diagram for TR1 and Parallel Mode the intersection is
labelled "nobody cares" :-)
The patch is OK for trunk though.
More information about the Libstdc++
mailing list