[cfe-commits] [PATCH][MS] - operator __uuidof implementation part 1
Douglas Gregor
dgregor at apple.com
Fri Sep 3 10:17:13 PDT 2010
On Sep 3, 2010, at 10:16 AM, Sebastian Redl wrote:
>
> On Sep 3, 2010, at 8:56 AM, Douglas Gregor wrote:
>
>>
>> On Sep 1, 2010, at 8:49 PM, Francois Pichet wrote:
>>
>>> Hi,
>>>
>>> This patch is part 1 of X of my implementation of the Microsoft
>>> __uuidof operator.
>>> I want to go incrementally for this one because I don't want to submit
>>> a huge patch.
>>> The basic parsing is completed but some sema and all the code gen are missing.
>>>
>>> __uuidof is similar to the typeid operator so I used that operator as
>>> template of what to do.
>>
>> + // FIXME: is __uuidof really value-dependent if the type or
>> + // expression are dependent?
>> +
>> + // FIXME: is __uuidof really value-dependent if the type or
>> + // expression are dependent?
>> + Operand->isTypeDependent() || Operand->isValueDependent()),
>> + Operand(Operand), Range(R) { }
>>
>> Yes, it makes sense that __uuidof is never type-dependent and is only value-dependent if the argument is type- or value-dependent.
>>
>> Is there anything dynamci about __uuidof? In other words, is the result of __uuidof always a constant, or can it involve run-time computation? If it does not involve run-time computation, then you can use the Unevaluated context rather than the PotentiallyPotentiallyEvaluated context.
>
> If __uuidof is not dynamic (and I don't think it is), then it is value-dependent if the operand is type-dependent, but it doesn't care about whether the operand is value-dependent.
Yes, good point.
- Doug
More information about the cfe-commits
mailing list