[Bug c++/93467] [concepts] getting "type constraint differs in template redeclaration" error after friend declaration in template

ppalka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue May 26 18:41:38 GMT 2020


Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
                 CC|                            |ppalka at gcc dot gnu.org
      Known to fail|                            |10.0, 11.0
   Last reconfirmed|2020-01-28 00:00:00         |2020-5-26

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Reconfirmed on trunk.  I ran into this when writing a fix for PR

Here is another valid testcase which we reject:

template<bool B> requires B
  class C;

class S
  template<bool B> requires B
    friend class ::C;

testcase.C:8:20: error: ‘C<B>’ does not match original declaration
    8 |     friend class ::C;
      |                    ^
testcase.C:2:9: note: original template declaration here
    2 |   class C;
      |         ^

More information about the Gcc-bugs mailing list