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<TT> */ template <class ... TT> struct Fold; /* concept TestInt<T> */ template <class T> struct IntFoldCtor { enum RetType { Ret = false }; }; template <class T> concept bool TestInt = (bool)IntFoldCtor<T>::Ret || is_same<T,int>::value ; template <TestInt ... TT> struct IntFoldCtor<Fold<TT...> > { enum RetType { Ret = true }; }; TestInt< Fold<int,Fold<int,int>,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