[Bug c++/94984] rejects requires clause in array declaration

nathan at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu May 7 12:47:03 GMT 2020


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

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-05-07
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
silly write only comments: 

Daveed tried the following, which we accept


template<int N>
char (*f(int i) requires(sizeof(i) < 100))[N] {}

(note how the trailing-requires-clause was moved to within the declarator) and
sure enough GCC accepts that.


More information about the Gcc-bugs mailing list