C++ PATCH for c++/42137 (lookup of A::A in ctor-initializer)

Jason Merrill jason@redhat.com
Tue Nov 24 21:34:00 GMT 2009


After DR 147, A::A is interpreted to mean the constructor for A, but DR 
318 amended that to only apply in situations where a type name isn't 
required by the syntax.  In a ctor-initializer, if we see a 
nested-name-specifier we know that we're initializing a base class, so 
we can find the type.

This patch also improves some diagnostics for when lookup finds the 
constructor instead of the type that the user intended, and for giving 
the wrong number of template<> headers.

Tested x86_64-pc-linux-gnu, applied to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 42137.patch
Type: text/x-patch
Size: 8403 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20091124/3e5765df/attachment.bin>


More information about the Gcc-patches mailing list