[c++-concepts] Parsing for template requirements

Andrew Sutton andrew.n.sutton@gmail.com
Fri Mar 1 16:13:00 GMT 2013


Two patches attached.

The reqs-parsing patch adds parsing support for template requirements
(i.e., requires clauses). This is supported for all template
declarations and non-template member functions of class templates.
Grammar changes are documented in comments. Semantic processing of
constraints is stubbed out for the time being.

The flags patch just enables -fconcepts by default.

The combined change log is:

2013-03-01  Andrew Sutton  <andrew.n.sutton@gmail.com>

        * cp-tree.h (saved_scope): Add template requirements.
        (finish_template_requirements): Declare
        * parser.c (cp_parser_template_requirement_opt): Declare.
        (cp_parser_template_declaration): Document grammar extensions.
        (cp_parser_type_parameter): Parse requirements for template
        template parameters.
        (cp_parser_member_declaration): Parse requirements for
        members of class templates.
        (cp_parser_template_requirement_opt): Define.
        (cp_parser_template_declaration_after_exp): Parse requirements
        for template declarations.
        * semantics.c (finish_template_requirements): Define.
        * lex.c (cxx_init): Enable concepts by default.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flags.patch
Type: application/octet-stream
Size: 395 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130301/9e6537bd/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reqs-parsing.patch
Type: application/octet-stream
Size: 12800 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130301/9e6537bd/attachment-0001.obj>


More information about the Gcc-patches mailing list