: 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.
templatestruct Cn{
template int get(){return N;}
};
template
struct Pr:Cn {
void fn(){
t
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80950
--- Comment #3 from 陈林熙 ---
You're right. ISO IEC 14882 explicitly illustrates this.
In GCC5.3, you can write a global function:
template int (get) {}
Cheat the compiler.
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: kmp53 at sina dot com
Target Milestone: ---
template concept bool Same=std::is_same_v;
template concept bool IsContainer=requires(T t){
t.cnt();
typename T::innerType;
};
struct Ct {
void cnt(){;}
using
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: kmp53 at sina dot com
Target Milestone: ---
I found an parsing error for the default template parameter for Concept, and
the same syntax is correct in constexpr.
template constexpr bool
IsPtrC=std::is_pointer_v&&