[Mesa-dev] [PATCH 05/13] i965/vec4: one dst_reg() constructor less

Emil Velikov emil.l.velikov at gmail.com
Thu Nov 5 12:29:08 PST 2015


On 5 November 2015 at 19:04, Matt Turner <mattst88 at gmail.com> wrote:
> On Thu, Nov 5, 2015 at 8:17 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> From: Emil Velikov <emil.velikov at collabora.co.uk>
>>
>> Just fold the brw_type_for_base_type() and use a delegated
>> constructor.
>>
>> Note this is a c++11 feature and the compiler will warn us if it's
>> set/defaults to an earlier version of the standard.
>>
>> XXX: Should we just toggle c++11 on ? We seem to be using some of its
>> functionality already (anonymous unions) and we could even simplify
>> gallium/nouveau a bit.
>
> I said anonymous unions were a C11 (not C++11) feature and a language
> extension supported by gcc and clang. I have no idea if it's C++11 and
> it's not reason to claim we're already using C++11.

Anon unions are also part of the C++11 spec :P On the C11 side we have
both anon unions and struct.

My understanding is that although C header, wrapped with extern C
linkage tags, we implicitly enable/require this in C++ context.
Although if you feel strongly against this patch I will gladly drop
it.

-Emil


More information about the mesa-dev mailing list