[cfe-commits] r127603 - in /cfe/trunk: lib/Sema/SemaTemplateInstantiateDecl.cpp test/CXX/except/except.spec/template.cpp
Douglas Gregor
dgregor at apple.com
Mon Mar 14 13:17:32 PDT 2011
On Mar 14, 2011, at 12:35 PM, Sebastian Redl wrote:
>
> On 14.03.2011, at 20:24, Sebastian Redl wrote:
>
>>
>> On 14.03.2011, at 19:59, Douglas Gregor wrote:
>>
>>>
>>> On Mar 14, 2011, at 11:51 AM, Sebastian Redl wrote:
>>>
>>>> Author: cornedbee
>>>> Date: Mon Mar 14 13:51:50 2011
>>>> New Revision: 127603
>>>>
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=127603&view=rev
>>>> Log:
>>>> Implement instantiation of noexcept spec and add a test case.
>>>
>>> Cool. I'm guessing that there's more work to be done to make noexcept instantiation be a SFINAE context, which IIRC it should be.
>>
>> Strictly speaking, the dynamic spec instantiation should be as well.
>>
>> template <typename T>
>> void f() throw(typename T::type);
>>
>> I'll write a test and see what I can do.
>
> OK, [temp.deduct]p7 contains a note that says that exception specs are not a SFINAE context. Apparently this is because "substitution occurs in all types and expressions that are used in the function type". Note that it is the function type, not the function, and as [except.spec]p13 tells us, "an exception-specification is not considered part of a function's type".
>
> So there. :-)
Fine! Be that way!
I think we *do* end up instantiating exception specifications at the wrong time still, but that's probably a separable issue. In particular, I think we're only supposed to instantiate the exception specifications once we've selected an overload in overload resolution
- Doug
More information about the cfe-commits
mailing list