On 22 January 2017 at 17:57, Tim Song wrote:
> On Sun, Jan 22, 2017 at 10:42 AM, Ville Voutilainen
> wrote:
>> + _GLIBCXX14_CONSTEXPR
>> + bool
>> + operator()(_Tp* __x, _Tp* __y) const
>> + { return uintptr_t(__x) > uintptr_t(__y); }
>
> These reinterpret_casts can't possibly
On Sun, Jan 22, 2017 at 10:42 AM, Ville Voutilainen
wrote:
> + _GLIBCXX14_CONSTEXPR
> + bool
> + operator()(_Tp* __x, _Tp* __y) const
> + { return uintptr_t(__x) > uintptr_t(__y); }
These reinterpret_casts can't possibly be constexpr.
Simple test case:
#include
constexpr b
Tested on Linux-x64.
The tests apparently would never fail unless the arrays are global
and the pointer arithmetic local. However, these tests should
ensure that the results are the same regardless of optimizations,
and these test fail with the current compiler unless the specializations
are prese