This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49470] no matching constructor for initialization errors not detected in g++
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 20 Jun 2011 10:27:20 +0000
- Subject: [Bug c++/49470] no matching constructor for initialization errors not detected in g++
- Auto-submitted: auto-generated
- References: <bug-49470-4@http.gcc.gnu.org/bugzilla/>
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 ]