[cfe-commits] [patch] Support decltype in destructor calls
Eli Friedman
eli.friedman at gmail.com
Thu Dec 8 00:31:17 PST 2011
On Wed, Dec 7, 2011 at 9:58 PM, David Blaikie <dblaikie at gmail.com> wrote:
>> Also, I think you need to check if the T is dependent.
>
> Hmm - I've tried a few things, but I think that's not an issue for
> now. It seems like any dependent type on the left of the '.' or '->'
> goes through the pseudo destructor path (see
> Sema::ActOnStartCXXMemberReference - first thing it does is check if
> it's a dependent type and sets MayBePseudoDestructor to true). So if
> the rhs is dependent we'll just get a mismatch at the moment since the
> lhs is never dependent.
>
> Unless I'm missing something - perhaps there's a more specific case
> you had in mind?
What about "y->~decltype(T())();" from your testcase? It looks like
you're getting the error before it actually tries to instantiate the
template.
-Eli
More information about the cfe-commits
mailing list