This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/49470] no matching constructor for initialization errors not detected in g++


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49470

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
           Severity|normal                      |enhancement

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-06-20 10:26:56 UTC ---
The summary isn't very relevant, the problem has nothing to do with
constructors, it's just that g++ doesn't check before instantiation whether no
valid specialization can be formed for a template.

14.6 [temp.res] p7:
If no valid specialization can be generated for a template definition, and that
template is not instantiated, the template definition is ill-formed, no
diagnostic required. ... [ Note: If a template is instantiated, errors will be
diagnosed according to the other rules in this Standard. Exactly when these
errors are diagnosed is a quality of implementation issue. âend note ]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]