[c++-concepts] concept introductions

Braden Obrzut admin@maniacsvault.net
Sat Sep 6 18:59:00 GMT 2014


Adds support for concept introduction short hand.

Andrew already committed this patch.

2014-09-04  Braden Obrzut  <admin@maniacsvault.net>

      * gcc/cp/constraint.cc (deduce_concept_introduction): New.
      (build_concept_check): Allow arg to be NULL to skip placeholder.
      (process_introduction_parm): New.
      (finish_concept_introduction): New.
      * gcc/cp/cp-objcp-common.c (cp_common_init_ts): Mark introduced parm.
      * gcc/cp/cp-tree.def: New INTRODUCED_PARM_DECL.
      * gcc/cp/parser.c (cp_parser_declaration): Tentatively parse for
      concept introduction.
      (cp_parser_introduction_list): New.
      (cp_parser_member_declaration): Tentatively parse for concept
      introduction.
      (cp_parser_template_introduction): New.
      (cp_parser_template_declaration_after_export): Parse concept
      introductions.
      * gcc/cp/pt.c (convert_template_argument): Treat INTRODUCED_PARM_DECL
      as a placeholder.
      (coerce_template_parms): If INTRODUCED_PARM_DECL represents a pack 
then
      match the entire parameter pack of the template.
      (type_dependent_expression_p): Treat INTRODUCED_PARM_DECL as a
      placeholder.
      * gcc/testsuite/g++.dg/concepts/introduction1.C: New.
      * gcc/testsuite/g++.dg/concepts/introduction2.C: New.
      * gcc/testsuite/g++.dg/concepts/introduction3.C: New.
      * gcc/testsuite/g++.dg/concepts/introduction4.C: New.
      * gcc/testsuite/g++.dg/concepts/introduction5.C: New.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: introductions.diff
Type: text/x-patch
Size: 29478 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140906/6a9bac21/attachment.bin>


More information about the Gcc-patches mailing list