This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77477] error recovery for explicit qualification
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 04 Sep 2016 23:55:21 +0000
- Subject: [Bug c++/77477] error recovery for explicit qualification
- Auto-submitted: auto-generated
- References: <bug-77477-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77477
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Keywords| |error-recovery
Last reconfirmed| |2016-09-04
Component|libstdc++ |c++
CC| |manu at gcc dot gnu.org
Ever confirmed|0 |1
Summary|template functions don't |error recovery for explicit
|seem to work |qualification
Severity|normal |enhancement
--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
The error is in your code, but g++ could be clearer:
namespace str {
template< class S >
int find1(S searchIn, S searchFor, bool iCase=false, int pos=0);
template< class S >
int find2<S>(S searchIn, S searchFor, bool iCase=false, int pos=0);
template< class S >
int str::find3(S searchIn, S searchFor, bool iCase=false, int pos=0);
template< class S >
int str::find4<S>(S searchIn, S searchFor, bool iCase=false, int pos=0);
}
prog.cc:5:10: error: expected initializer before '<' token
int find2<S>(S searchIn, S searchFor, bool iCase=false, int pos=0);
^
prog.cc:7:68: error: explicit qualification in declaration of 'int
str::find3(S, S, bool, int)'
int str::find3(S searchIn, S searchFor, bool iCase=false, int pos=0);
^
prog.cc:9:15: error: expected initializer before '<' token
int str::find4<S>(S searchIn, S searchFor, bool iCase=false, int pos=0);
^