[cfe-commits] r127603 - in /cfe/trunk: lib/Sema/SemaTemplateInstantiateDecl.cpp test/CXX/except/except.spec/template.cpp

Sebastian Redl sebastian.redl at getdesigned.at
Mon Mar 14 12:35:06 PDT 2011

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. :-)


More information about the cfe-commits mailing list