[Bug c++/71217] New: [concepts] Incorrect recursive concept evaluation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71217 Bug ID: 71217 Summary: [concepts] Incorrect recursive concept evaluation Product: gcc Version: 6.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sergstrukovlink at gmail dot com Target Milestone: --- Created attachment 38538 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38538&action=edit the sample program The attached file contains a sample program to show the problem. /* struct Fold */ template struct Fold; /* concept TestInt */ template struct IntFoldCtor { enum RetType { Ret = false }; }; template concept bool TestInt = (bool)IntFoldCtor::Ret || is_same::value ; template struct IntFoldCtor > { enum RetType { Ret = true }; }; TestInt< Fold,int> > is evaluated (incorrectly) as false. Here is a link to forum discussion of the problem https://groups.google.com/a/isocpp.org/forum/#!topic/concepts/k-PFfgLloXI
[Bug c++/71223] New: [fold expression] Incorrect processing a fold expression
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71223 Bug ID: 71223 Summary: [fold expression] Incorrect processing a fold expression Product: gcc Version: 6.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sergstrukovlink at gmail dot com Target Milestone: --- Created attachment 38539 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38539&action=edit example In the attached example compiler fails to compile the following line Test2(); // emits error If I change the definition of template using AddType = TypeBox ; // int to template using AddType = int ; the error disappeares. main.cpp: In instantiation of 'struct Test2': main.cpp:41:25: required from here main.cpp:23:74: error: invalid use of pack expansion expression using IndexList = decltype( ( IndexListBox<>() + ... + AddType() ) ) ; ^ make: *** [main.o] Error 1