std::to_address implementation and std::pointer_traits's static_assert
Tue Apr 20 20:08:14 GMT 2021
On 20/04/21 21:52 +0200, Ion Gaztañaga wrote:
>On 20/04/2021 15:36, Jonathan Wakely wrote:
>>No, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96416
>>I consider it a defect in the standard that pointer_traits is not
>>SFINAE friendly, but that's what the current standard requires.
>>I hope it will be changed for C++23.
>Many thanks for your quick and precise reply. And just like Giuseppe
>D'Angelo described in the bug comments, I also encountered that
>defining both element_type and value_type (which makes MSVC STL happy,
>libc++ still not tested) meets LWG3446.
>So at least for libstdc++ I will specialize std::pointer_traits for
>boost::container::vector<>::iterator and will revisit the issue
>if/when LWG3446 is applied.
It's on the gcc-10 branch as r10-9698, which will be in GCC 10.4:
That also includes the recently approved fix for LWG 3541:
More information about the Libstdc++