[Bug c++/80950] New: GCC about template bug

2017-06-02 Thread kmp53 at sina dot com
: 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

[Bug c++/80950] GCC about template bug

2017-06-02 Thread kmp53 at sina dot com
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.

[Bug c++/81157] New: If constexpr does not support Short-circuit evaluation

2017-06-21 Thread kmp53 at sina dot com
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

[Bug c++/81202] New: Concept parsing error for default template arguments

2017-06-25 Thread kmp53 at sina dot com
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&&