[Bug c++/90734] [concepts] Pre-normalization substitution into constraints of templated function breaks subsumption

andrew.n.sutton at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Nov 15 15:43:00 GMT 2019


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

Andrew Sutton <andrew.n.sutton at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrew.n.sutton at gmail dot com

--- Comment #3 from Andrew Sutton <andrew.n.sutton at gmail dot com> ---
I think this error is correct (i.e., there is no defect in trunk):

   48 |     static_assert(S2<int>::f());    // Bogus non-error

The requirements of this declaration:

    static constexpr bool f() requires bool_<true> && true { return true; }

are incomparable with those of the overloads requiring Foo and Bar. The atomic
constraints bool_<true> and true are not identical to those pulled in by the
normalization of Same_impl.


More information about the Gcc-bugs mailing list