[Bug c++/126943] "template argument 1 is invalid" error on using function parameter in type requirement

"ppalka at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126943

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
dup of PR104255, using a function parameter in an evaluated context within a
function signature currently doesn't work and gives a cryptic error

a workaround is to use a local requires-expr parameter instead of a function
parameter in the requirement:

-requires requires { typename C<g(a)>; }
+requires requires (T b) { typename C<g(b)>; }

*** This bug has been marked as a duplicate of bug 104255 ***
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.