https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101067

            Bug ID: 101067
           Summary: SFINAE Out-of-line Function Definition not Matching
                    Declaration
           Product: gcc
           Version: 11.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bboys_nick at icloud dot com
  Target Milestone: ---

Created attachment 51009
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51009&action=edit
The preprocessed file as required.

When declaring a class A constructor constrained to check for type equivalence
of the underlying value_type of a passed-in iterator with a in-class defined
nested class B, the out of line definition of this constructor does not match
the function declaration in class using SFINAE technique(enable_if<is_same<>>),
with both A and B being templated.

A more detailed description of the problem can be found on this thread on
stackoverflow.
https://stackoverflow.com/questions/67965118/c-concepts-sfinae-clang-and-msvc-g-different-results-for-out-of-line-functi

A brief test case is provided at https://godbolt.org/z/7nr7a8jY8.

Reply via email to