This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [c++-concepts] variable concepts


Committed.

Andrew Sutton


On Wed, Aug 13, 2014 at 3:24 AM, Braden Obrzut <admin@maniacsvault.net> wrote:
> This patch adds support for variable concepts.
>
> There is a known issue that prevents concept variables from having requires
> expressions that have parameters.  This issue is not within the scope of
> this patch as it affects adhoc requires expressions as well.
>
> 2014-08-13  Braden Obrzut <admin@maniacsvault.net>
>
>     * gcc/cp/constraint.cc (deduce_constrained_parameter): Deduce concept
>     from variable concept template-id expressions.
>     (normalize_var): New.
>     (normalize_template_id): Identify variable concepts.
>     (build_concept_check): Handle variable concepts.
>     (finish_shorthand_requirement): Handle variable concepts.
>     (diagnose_var): New.
>     (diagnose_node): Identify variable concepts.
>     * gcc/cp/decl.c (grokvardecl): Pass concept flag through to
>     check_explicit_specialization.
>     (grokdeclarator): Allow variable concepts and pass concept flag through
>     grokvardecl.
>     * gcc/cp/parser.c (cp_is_constrained_parameter): Accept variable
>     concepts.
>     (cp_parser_nonclass_name): Accept variable concepts.
>     (get_concept_from_constraint): Handle variable concepts.
>     * gcc/cp/pt.c (tsubst_copy_and_build): Lookup variable templates.
>     (value_dependent_expression_p): Check requires expressions for value
>     dependence.
>     * gcc/cp/semantics.c (finish_call_expr): Don't instantiate variable
>     templates if processing a template declaration.
>     * gcc/testsuite/g++.dg/concepts/decl-diagnose.C: Change expected error
>     as variable concepts are now handled.
>     * gcc/testsuite/g++.dg/concepts/var-concepts1.C: New test.
>     * gcc/testsuite/g++.dg/concepts/var-concepts2.C: New test.
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]