[c++-concepts] function concepts with deduced return type

Andrew Sutton andrew.n.sutton@gmail.com
Tue Sep 30 12:54:00 GMT 2014


Do not allow. Return type deduction only happens during instantiation,
and concepts are never instantiated. Therefore, we can't find the
return type of a function concept until you try to normalize the
return expression.

2014-09-25  Andrew Sutton  <andrew.n.sutton@gmail.com>

        Explicitly disallow function concepts with deduced return types.
        * gcc/cp/constraint.cc (check_function_concept): Remove check
        for deduced return type.
        * gcc/cp/decl.c (check_concept_fn): Explicitly check for
        deduced return type.
        * gcc/testsuite/g++.dg/concepts/fn-concept2.C: New.

Andrew Sutton
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fn-concept2.patch
Type: text/x-patch
Size: 2024 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140930/98d57a9a/attachment.bin>


More information about the Gcc-patches mailing list