[c++-concepts] Restore missing code from previous trunk merge

2015-02-05 Thread Braden Obrzut
to follow suit, but for now it fixes a regression with compound requirements. - Braden Obrzut 2015-02-05 Braden Obrzut ad...@maniacsvault.net * gcc/cp/constexpr.c (potential_constant_expression_1): Readded missing cases from previous merge from trunk. * gcc/cp/cxx-pretty-print.c

[c++-concepts] Bring constraints in line with spec

2015-02-03 Thread Braden Obrzut
like any earlier point was suitable for determining that the TEMPLATE_TEMPLATE_PARM should be unwrapped. - Braden Obrzut 2015-02-03 Braden Obrzut ad...@maniacsvault.net * gcc/cp/class.c (build_clone): Clone constraints. * gcc/cp/constraint.cc (normalize_atom): Update diagnostic

Re: Concepts code review

2014-11-15 Thread Braden Obrzut
for being value dependent for some cases, but then added it as type dependent when something else failed. May require some time to pin down exactly what needs to be done here. - Braden Obrzut 2014-11-15 Braden Obrzut ad...@maniacsvault.net * gcc/cp/constraint.cc

[c++-concepts] Fix inversion of -fconcepts

2014-10-18 Thread Braden Obrzut
Trivial patch to fix the inversion of -fconcepts and -fno-concepts. 2014-10-18 Braden Obrzut ad...@maniacsvault.net * gcc/c-family/c.opt (flag_concepts): The concepts option was inverted. diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index c1645ea..c165477 100644 --- a/gcc/c

[c++-concepts] concept introductions

2014-09-06 Thread Braden Obrzut
Adds support for concept introduction short hand. Andrew already committed this patch. 2014-09-04 Braden Obrzut ad...@maniacsvault.net * gcc/cp/constraint.cc (deduce_concept_introduction): New. (build_concept_check): Allow arg to be NULL to skip placeholder

[c++-concepts] variable concepts

2014-08-13 Thread Braden Obrzut
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 ad

Re: Patch for constexpr variable templates

2014-08-06 Thread Braden Obrzut
Here's a patch for the more conservative option. - Braden Obrzut 2014-08-06 Braden Obrzut ad...@maniacsvault.net * pt.c (check_explicit_specialization): Ensure tmpl is a function template before checking if it is inline for COMDAT. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index

Re: Patch for constexpr variable templates

2014-08-05 Thread Braden Obrzut
that entire block if it is a function template. Should I submit that as a patch? - Braden Obrzut On 08/05/2014 04:06 PM, Paolo Carlini wrote: Hi, On 08/05/2014 08:26 PM, Jason Merrill wrote: Applied with a few formatting/comment tweaks, thanks! Great. I will double check but var-templ4.C fails

Re: Patch for constexpr variable templates

2014-08-01 Thread Braden Obrzut
and doesn't require any extra work. How does this patch look? - Braden Obrzut 2014-08-01 Braden Obrzut ad...@maniacsvault.net * decl.c (grokvardecl): Handle specializations of variable templates. (grokdeclarator): Handle variable template id expressions and NULL_TREE return from

Re: Patch for constexpr variable templates

2014-07-31 Thread Braden Obrzut
change to check_explicit_specialization. Related to that, grokvardecl might be using build_lang_decl more often than it did previously. I might be able to narrow that down a little, but I'm not sure. - Braden Obrzut 2014-07-31 Braden Obrzut ad...@maniacsvault.net * decl.c

Re: Patch for constexpr variable templates

2014-07-30 Thread Braden Obrzut
way, but from what I understand the only reason function templates are handled like that is because of overload resolution? My implementation strategy thus far has been to mirror function templates as long as possible. - Braden Obrzut

Re: Patch for constexpr variable templates

2014-07-29 Thread Braden Obrzut
. The other changes to test cases are a result of this change causing additional errors on certain, variable template like constructs to be thrown. - Braden Obrzut 2014-07-29 Braden Obrzut ad...@maniacsvault.net * decl.c (grokvardecl): Handle specializations of variable templates

Re: Patch for constexpr variable templates

2014-07-27 Thread Braden Obrzut
So given this, should I leave the test cases that fail for this reason alone or should I still change them to dg-message? It sounds like GCC's behavior with auto in function parameters needs to be changed, but that definitely sounds like a separate patch to me. - Braden Obrzut

Re: Patch for constexpr variable templates

2014-07-26 Thread Braden Obrzut
Merrill wrote: Fair enough, but in that case let's use 'sorry' rather then 'error' to be clear that it's a missing feature. Tests like g++.dg/cpp1y/pr59638.C produce extra failures if this is changed. Is there something I'm supposed to do to account for that? - Braden Obrzut

Re: Patch for constexpr variable templates

2014-07-25 Thread Braden Obrzut
you mentioned should be fixed. - Braden Obrzut 2014-07-25 Braden Obrzut ad...@maniacsvault.net * decl.c (grokvardecl): Handle specializations of variable templates. (grokdeclarator): Handle variable template id expressions. * decl2.c (check_member_template): Allow declaration

Re: Patch for constexpr variable templates

2014-07-21 Thread Braden Obrzut
Sure, test cases moved. My FSF paperwork is in place. I don't have write access to the repository though of course. - Braden Obrzut 2014-07-21 Braden Obrzut ad...@maniacsvault.net * decl.c (grokvardecl): Handle specializations of variable templates. (grokdeclarator): Handle

Re: Patch for constexpr variable templates

2014-07-19 Thread Braden Obrzut
the existing variable template branch, I can redo the patch without Gabriel's changes. 2014-07-19 Braden Obrzut ad...@maniacsvault.net * decl.c (grokvardecl): Handle specializations of variable templates. (grokdeclarator): Handle variable template id expressions. * decl2.c

Patch for constexpr variable templates

2014-07-12 Thread Braden Obrzut
-12 Braden Obrzut ad...@maniacsvault.net * decl.c (grokvardecl): Handle specializations of variable templates. (grokdeclarator): Handle variable template id expressions. * decl2.c (check_member_template): Allow declaration of template member variables. (grokfield): Assign class

[c++-concepts] Change constraint equivalence

2014-06-27 Thread Braden Obrzut
To bring the implementation in line with changes going into the concepts draft, use syntactical equivalence in place of logical equivalence when matching declarations. 2014-06-27 Braden Obrzut ad...@maniacsvault.net * gcc/cp/constraint.c (equivalent_constraints): Compare the trees

[c++-concepts] Fix assertion failure with cp_maybe_constrained_type_specifier

2014-06-17 Thread Braden Obrzut
). 2014-06-17 Braden Obrzut ad...@maniacsvault.net * gcc/cp/parser.c (cp_maybe_constrained_type_specifier): Fix assertion failure if baselink was passed in as decl. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 1eaf863..40d1d63 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c

[c++-concepts] Allow function parameters to be referenced in trailing requires clauses

2014-06-17 Thread Braden Obrzut
Cdecltype(x) (); Note that the test case trailing-requires-overload.C will fail to compile unless the previously submitted patch is applied first. 2014-06-17 Braden Obrzut ad...@maniacsvault.net * gcc/cp/parser.c (cp_parser_trailing_requirements): Handle requires keyword manually so that we