[C++ PATCH, RFC] PR c++/63959, continued
Ville Voutilainen
ville.voutilainen@gmail.com
Fri Jan 30 18:13:00 GMT 2015
On 30 January 2015 at 19:46, Jason Merrill <jason@redhat.com> wrote:
> On 01/20/2015 09:27 AM, Ville Voutilainen wrote:
>>
>> +#define YES2(type) TRY(std::is_trivial<type>::value); \
>> + TRY(std::is_trivial<type[]>::value); \
>> TRY(std::is_trivial<const volatile type>::value)
>
>
>> +YES2(void *);
>> +YES2(int A::*);
>
>
> Why would void *const volatile still be trivial?
Arrrrggggh. It isn't. YES and YES2 are macros, so YES2(void*) expands to
is_trivial<const volatile void*>::value, which is true, whereas
is_trivial<void* const volatile>::value is false.
I think it would be reasonable to convert these macros in that test into
function templates, no? :)
More information about the Libstdc++
mailing list