[c++-concepts] 2 patches

Andrew Sutton andrew.n.sutton@gmail.com
Mon Aug 18 18:56:00 GMT 2014


The first improves support for shorthand concepts, and includes the
ability to write default arguments. Also, no more ICE when omitting
identifiers for template parameters.

The second adds constraint checks when taking the address of an
overloaded function.

Corresponding change logs follow:

2014-08-13  Andrew Sutton  <andrew.n.sutton@gmail.com>

        * gcc/cp/class.c (resolve_address_of_overloaded_function): Check
        constraints.
        * gcc/cp/decl.c (grokfndecl): For now, disallow constrained
        non-template functions.
        * gcc/testsuite/g++.dg/concepts: New tests.

2014-08-13  Andrew Sutton  <andrew.n.sutton@gmail.com>

        * gcc/cp/parser.c (get_id_declarator, get_identifier): New helper
        functions.s
        (cp_check_constrained_type_parm): Don't fail on null declarators.
        (cp_finish_constrained_parameter): Remove redundant processing for
        checking declarations.
        (cp_maybe_type_parameter, cp_declares_type_parameter,
        cp_declares_type_template_parameter,
        cp_declares_template_template_parameter): New helper functions for
        determining when a parameter declaration is actually a constrained
        template parameter.
        (cp_parser_default_type_template_argument,
        cp_parser_default_template_template_argument): Parsing support
        for argument types of default arguments.
        (cp_parser_template_parameter): Finish constrained parameters
        after all variadic and default arg checks.
        (cp_parser_parameter_declaration): Parse default arguments
        differently if the parameter actually declares a type parameter.
        * gcc/testsuite/g++.dg/concepts: New tests.

Andrew Sutton
-------------- next part --------------
A non-text attachment was scrubbed...
Name: template-parm.patch
Type: text/x-patch
Size: 11471 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140818/3d65fbd7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: address-of.patch
Type: text/x-patch
Size: 1352 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140818/3d65fbd7/attachment-0001.bin>


More information about the Gcc-patches mailing list