[Mesa-dev] [PATCH 06/23] i965: Define common register base class shared between both back-ends.

Petri Latvala petri.latvala at intel.com
Mon Dec 2 23:49:18 PST 2013


On 12/02/2013 10:36 PM, Francisco Jerez wrote:
> Would you prefer 'this->operator=(reg);'?
>
> I just remembered...  The reason this wouldn't work is that it would
> trigger an implicit conversion from 'backend_reg' to 'fs_reg', causing
> infinite recursion into the fs_reg constructor.
>
>

For the record, this->backend_reg::operator=(reg) would have done what 
you aimed for.

Not saying it kosher either way though, calling assignment operator in a 
constructor is iffy :P. The proper way is selecting the correct base 
class constructor to call.


-- 
Petri Latvala



More information about the mesa-dev mailing list