https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80950
Bug ID: 80950
Summary: GCC about template bug
Product: gcc
Version: 7.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: kmp53 at sina dot com
Target Milestone: ---
There's no problem around GCC5.3, and now GCC6 can't compile the code until the
latest GCC7.1.
template<class...T>struct Cn{
template<int N> int get(){return N;}
};
template<class...T>
struct Pr:Cn<T...> {
void fn(){
this->get<1>();//①
}
};
GCC7.1 prompt:
'expected, primary-expression, before') 'token. in line ①
The GCC6 prompt is different,but there is an error.
And I used the latest VS2017 compiler is no problem.