1 2013-11-012 Andrew Sutton <andrew.n.sutton@gmail.com>
2 * gcc/cp/pt.c (tsubst_pack_conjunction): Don't try to conjoin
5 2013-11-012 Andrew Sutton <andrew.n.sutton@gmail.com>
6 * gcc/cp/semantics.c (fixup_template_type): Compare primary template
7 types to specializations using structural types so we don't run into
8 canonical type errors with constrained specializations.
10 2013-11-08 Andrew Sutton <andrew.n.sutton@gmail.com>
11 * gcc/cp/pt.c (add_inherited_template_parms): Instantiate requirements
12 in a processing template decl context.
14 2013-11-05 Andrew Sutton <andrew.n.sutton@gmail.com>
15 * gcc/cp/semantics.c (fixup_template_type): Add a same-type check
16 for specialiations so we don't accidentally match non-dependent
17 specializations having a different type.
19 2013-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
20 * gcc/cp/decl.c (grokdeclarator): Reject concept keyword
21 in typedefs, function parameters, data members, non-static
22 member functions and variables. Allow static member functions
25 2013-10-30 Andrew Sutton <andrew.n.sutton@gmail.com>
26 * gcc/cp/semantics.c (fixup_template_type): Don't emit errors when
27 no templates can be found with matching constraints.
29 2013-10-25 Andrew Sutton <andrew.n.sutton@gmail.com>
30 * gcc/cp/parsre.c (cp_parser_requires_expression): Gracefully
31 fail when parsing a requires expr outside a template.
33 2013-10-24 Andrew Sutton <andrew.n.sutton@gmail.com>
34 * gcc/cp/c-common.c (c_common_r): Remove unused keywords "assume",
35 "axiom", and "forall".
36 * gcc/cp/c-common.h (rid): Removed unused reserved word ids.
38 2013-10-24 Edward Smith-Rowland <3dw4rd@verizon.net>
39 * gcc/cp/typeck.c (cp_build_function_call_vec): Use unused variable
42 2013-10-23 Andrew Sutton <andrew.n.sutton@gmail.com>
43 * gcc/cp/class.c (get_member_fntemplate): New.
44 (are_constrained_member_overloads): Only get a template declaration
45 if the member function is, in fact, a template or temploid.
46 * gcc/cp/pt.c (check_explicit_specialization): Do not allow
47 explicit specializations to be declared 'concept', and do not allow
48 an explicit specialization of a concept.
49 * gcc/cp/decl.c (grokfndecl): Propagate the concept flag to
50 check_explicit_specialization.
52 2013-10-22 Andrew Sutton <andrew.n.sutton@gmail.com>
53 * gcc/c-family/c-common.c (cxx_dialect): Make the default
55 * gcc/cp/constraint.cc (check_constrained_friend): Don't assert
58 2013-10-16 Andrew Sutton <andrew.n.sutton@gmail.com>
59 * gcc/cp/logic.cc (left_requires), (decompose_left): Add
60 decomposition rules for requires expressions.
61 (subsumes_requires), (subsumes_prop): Add subsumption rules for
63 * gcc/cp/constraint.cc (diagnose_trait): Diagnose failed conversion
66 2013-10-16 Andrew Sutton <andrew.n.sutton@gmail.com>
67 * gcc/cp/constraint.cc (finish_concept_name): Allow functions with
68 the same name as concepts to resolve as call expressions in the
71 2013-10-16 Andrew Sutton <andrew.n.sutton@gmail.com>
72 * gcc/cp/constraint.cc (conjoin_requiremens): New.
73 (resolve_constraint_check): Filter non-concept candidates before
74 coercing arguments. Perform deduction in a template-decl processing
75 context to prevent errors during diagnosis.
76 (finish_concept_name), (finish_shorthand_requirement),
77 (get_shorthand_requirements): New.
78 * gcc/cp/pt.c (template_parm_to_arg): Make non-static.
79 (process_templat_parm): Build shorthand requirements from the
80 parameter description.
81 (end_templat_parm_list): New.
82 (convert_placeholder_argument): New.
83 (convert_template_argument): Match placeholder arguments against
84 any template parameter.
85 (tsubst_pack_conjuction): New.
86 (tsubst_expr): Expand a pack as a conjunction.
87 (type_dependent_expression_p): Placeholders are always type
89 * gcc/cp/parser.c (cp_is_constrained_parameter),
90 (cp_finish_template_type_parm), (cp_finish_template_template_parm)
91 (cp_finish_non_type_template_parm), (cp_finish_constrined_parameter):
93 (cp_parser_template_parameter): Handle constrained parameters.
94 (cp_parser_nonclass_name): An identifier naming an overload set
95 may declare a constrained parameter.
96 (cp_parser_type_parameter), (cp_parser_template_declaration_after_exp):
97 Get shorthand requirements from the tmeplate parameter list.
98 * gcc/cp/cp-tree.h (TEMPLATE_PARM_CONSTRAINTS): New.
100 2013-10-07 Andrew Sutton <andrew.n.sutton@gmail.com>
101 * gcc/cp/cp-tree.h (check_constrained_friend): Take requirements as
103 * gcc/cp/constraints.cc (check_constrained_friend): Do not diagnose
104 errors in unconstrained friend declarations.
105 * gcc/cp/parser.cc (cp_parser_member_declaration): Pass current
106 requirements to check_constrained_friend.
108 2013-10-07 Andrew Sutton <andrew.n.sutton@gmail.com>
109 * gcc/cp/parser.c (cp_parser_member_declaration): Check that
110 a constrained friend definition is valid.
111 * gcc/cp/decl.c (grokfndecl): Disallow constrained friend template
113 * gcc/cp/constraints.cc (check_constrained_friend): New.
114 * gcc/cp/typeck.c (cp_build_function_call_vec): Diagnose constraints
115 in the presence of the failure of a single candidate.
116 * gcc/cp/cp-tree.h (check_constrained_friend): New.
117 * gcc/cp/call.c (is_non_template_member_fn): Make inline.
118 (is_non_template_friend), (is_constrainable_non_template_fn): New.
119 (add_function_candidate): Predicate check on
120 is_constrainable_non_template_fn.
122 2013-09-10 Andrew Sutton <andrew.n.sutton@gmail.com>
123 * gcc/cp/cp-tree.h (TEMPLATE_PARMS_CONSTRAINTS): New.
124 * gcc/cp/parser.c (cp_parser_template_declaration_after_export),
125 (cp_parser_type_parameter): Use TEMPLATE_PARMS_CONSTRAINTS.
126 * gcc/cp/semantics.c (fixup_template_scope): Use
127 TEMPLATE_PARMS_CONSTRAINTS.
129 2013-09-11 Andrew Sutton <andrew.n.sutton@gmail.com>
130 * gcc/cp/cxx-pretty-print.c (pp_cxx_compound_requirement),
131 (pp_cxx_type_requirement), (pp_cxx_validtype_expr): Use
132 pp->type_id() instead of pp_cxx_type_id().
134 2013-09-09 Andrew Sutton <andrew.n.sutton@gmail.com>
135 * gcc/cp/pt.c (get_class_bindings): Pass the partial specialization
136 for constraint evaluation. Evaluate constraints, resulting in
137 deduction failure on error.
138 (get_specializaing_template_decl), (get_specialization_constraints),
139 (maybe_new_partial_specialization): New.
140 (maybe_process_partial_specialization): Allow the creation of
141 new types for constrained partial specializations.
142 (process_partial_specialization): Modify the canonical type
143 of constrained partial specializations.
144 (instantiate_class_template_1): Do not explicitly check constraints
145 during class template instantiation.
146 (tsubst_decl): Instantiate the constraints of template declarations.
147 (more_specialized_class): Pass specializations to get_class_bindings().
148 Compare specialization constraints if the types are equivalent.
149 (most_specialized_class): Pass specialization to get_class_bndings().
150 * gcc/cp/decl2.c (check_class_fn): Get the decl's requirements from
151 either the current template reqs or from the template parameters.
152 Allow overloading of constrained out-of-class member definitions.
153 * gcc/cp/semantics.c (fixup_template_type): New. Match the template
154 scope to a specialization with appropriate constraints.
155 (finish_template_type): Fix template type when entering scope.
156 * gcc/cp/parser.c (cp_parser_parse_type_parameter): Attach
157 requirements to the current template parameter list.
158 (cp_parser_init_declarator): Parse requires clauses for out-of-class
159 member definitions. Be sure to restore current constraints before
160 exiting the function.
161 (cp_parser_member_declarator): Restore the previous requirements in
162 an early-exit branch.
163 (cp_parser_late_parsing_for_member): Restore constraints after
164 maybe_end_member_template_processing().
165 (cp_parser_template_declaration_after_exp): Attach constraints to
166 the current template parameters.
167 * gcc/cp/constraint.cc (reduce_template_id): Don't crash when
168 omitting ()'s on constraint calls.
169 (check_requirements): Don't evaluate dependent arguments.
170 (check_constraints): Don't try to evaluate when arguments are
172 (equivalent_constraints): Optimize the case when a and b are the
175 2013-07-26 Andrew Sutton <andrew.n.sutton@gmail.com>
176 * gcc/cp/semantics.c (trait_expr_value): Evaluate __is_same_as.
177 (finish_trait_expr): Check __is_same_as and __is_convertible_to.
178 * gcc/cp/constraint.cc (diagnose_trait): Diagnose failures in
180 * gcc/cp/parser.c (cp_parser_primary_expression),
181 (cp_parser_trait_expr): Parse __is_same_as.
182 * gcc/cp/cp-tree.h (cp_trait_kind): Add CPTK_IS_SAME_AS.
183 * gcc/cp/cxx-pretty-print.c (pp_cxx_trait_expression): Pretty print
186 2013-07-26 Andrew Sutton <andrew.n.sutton@gmail.com>
187 * gcc/cp/tree.c (cp_walk_subtrees): Don't recurse through the
188 requires expr parameter list.
190 2013-07-25 Andrew Sutton <andrew.n.sutton@gmail.com>
191 * gcc/cp/parser.c (cp_parser_requires_expr): Update parser using new
192 requires expression nodes. Renamed some grammar productions to better
193 reflect the representation of the syntax. Create a new scope for
195 (cp_parser_nested_requirement): Wrap results in a NESTED_REQ node.
196 * gcc/cp/semantics.c (xvalue_result_type): New.
197 (trait_expr_value): Evaluate __is_convertible_to.
198 (finish_requires_expr): Implemented, along with other functions to
199 construct and evaluate nodes for template constraints.
200 (potential_constant_expression_1): Handle requires expressions.
201 (finish_template_requirements), (finish_requires_expr), etc:
202 Move to constraint.cc.
203 * gcc/cp/cp-tree.def: (REQUIRES_EXPR), (EXPR_REQ), (TYPE_REQ),
204 (NESTED_REQ), (VALIDEXPR_EXPR), (VALIDTYPE_EXPR), (CONSTEXPR_EXPR):
206 * gcc/cp/cp-objcp-common.c (cp_common_init_ts): Make new nodes typed.
207 * gcc/cp/cp-tree.h (finish_expr_requirement),
208 (finish_type_requirement), (finish_nested_requirement),
209 (finish_validexpr_expr), (finish_validtype_expr),
210 (finish_constexpr_expr): New.
211 * gcc/cp/pt.c (convert_nontype_argument): Use can_convert_standard.
212 (retrieve_local_specialization), (register_local_specialization),
213 (extract_fnparm_pack): Make non-static.
214 (tsubst_expr): Substitution rules for requires expressions.
215 (instantiate_requirements): Move to constraints.cc
216 (tsubst_constraint): Remove.
217 * gcc/cp/call.c (can_convert): Allow user-defined conversions.
218 (can_convert_standard): New.
219 * gcc/cp/cvt.c (convert_to_reference): Use can_convert_standard.
220 * gcc/cp/search.c (check_final_overrider): Use can_cnvert_standard.
221 * gcc/cp/typeck.c (build_static_cast_1): Use can_convert_standard.
222 * gcc/cp/error.c (dump_expr): Pretty print new nodes.
223 * gcc/cp/cxx-pretty-print.c (pp_cxx_primary_expression): Pretty
224 print new expr/req nodes.
225 (pp_cxx_requires_expr): New along with related functions for
226 pretty printing requirements.
227 (pp_cxx_parameter_declaration_clause): Accommodate "raw" parameter
228 lists in addition to function decls.
229 (pp_cxx_requirement_parameter_list): Unified with parameter decl clause.
230 * gcc/cp/cxx-pretty-print.h (pp_cxx_requires_expr): New along with
231 related functions for pretty printing requirements.
232 * gcc/cp/logic.cc: Move header comments to top of file.
233 * gcc/cp/constraint.cc (reduce_requirements): Handle requires
235 (diagnose_constraints): Rename and handle requires expressions.
237 2013-07-01 Andrew Sutton <andrew.n.sutton@gmail.com>
238 * gcc/cp/error.c (cp_printer): Fix unnecessary whitespace change.
239 * gcc/cp/constraint.cc (diagnose_node): Don't fail diagnosing
242 2013-07-01 Andrew Sutton <andrew.n.sutton@gmail.com>
243 * gcc/cp/class.c (are_constrained_member_overloads): Fix doc typos.
245 2013-06-24 Andrew Sutton <andrew.n.sutton@gmail.com>
246 * gcc/cp/parser.c (cp_parser_init_declarator): Parse template
247 requirements for out-of-class member definitions.
248 * gcc/cp/decl2.c (check_classfn): Include match out-of-class
249 definitions using constraints.
250 * gcc/cp/constraint.cc (equivalently_constrained). Use get_constraints.
251 (more_constrained). Use get_constraints.
253 2013-06-24 Andrew Sutton <andrew.n.sutton@gmail.com>
254 * gcc/cp/cp-tree.h (tree_template_info). Remove constraint from
256 (check_template_info): Removed (unused).
257 (TI_CONSTRAINT): Removed (no longer needed) along with related macros.
258 (DECL_CONSTRAINTS): New. Get constraints from DECL_SIZE_UNIT for
260 (build_template_info): Removed overload taking constraints.
261 (get_constraints): Removed (no longer needed).
262 * gcc/cp/class.c (are_constrained_member_overlaods): Allow constrained
263 member function templates to be differentiated as overloads.
264 * gcc/cp/decl.c (decls_match): Only compare constraints on
266 (grokfndecl): Don't pass constraints to build_template_info.
267 * gcc/cp/tree.c (bind_template_template_parm): Don't pass constraints
268 to build_template_info.
269 * gcc/cp/pt.c (build_template_info): Removed overload taking
271 (check_explicit_specialization): Don't build new constraints for
273 (build_template_decl): Pass constraints. Update docs.
274 (process_partial_specialization): Stub out support for constrained
275 partial specialiations.
276 (push_template_decl_real): Build template decls with current template
277 reqs. Don't pass constraints to build_template_info.
278 (add_inherited_template_parms): Build new constraints from inherited
279 template constructors.
280 (redeclare_class_template): Update to new constraint interface.
281 (is_compatible_template_arg): Update to new constraint interface.
282 (lookup_template_class_1): Don't build new constraints or pass them to
284 (instantiate_class_template_1): Update to new constraints interface.
285 (tsubst_decl): Don't build new constraints or pass them to
286 build_template_info. For function templates, explicitly instantiate
287 new constraints for member functions of class templates.
288 * gcc/cp/semantics.c: Associate constraints with template template
289 parms directly, not through template info.
290 * gcc/cp/constraint.cc (get_constraints): Simplified to use new constraints
292 (check_constraints): Update to use new constraints interface.
293 (equivalently_constrained): Update to use new constraints interface.
294 (more_constrained): Update to use new constraints interface.
295 * gcc/cp/parser.cpp (cp_parser_late_parsing_for_member): Update to use
296 new constraints interface.
297 * gcc/cp/call.c (is_non_template_member_fn): New.
298 (add_function_candidate): Only check constraints for non-template member
301 2013-06-21 Andrew Sutton <andrew.n.sutton@gmail.com>
302 * gcc/cp/parser.c (cp_parser_requires_clause): Pulled out of
303 cp_parser_requires_clause_opt for reuse in the requires expr parser.
304 (cp_parser_requires_expression): New, along with a family of
305 sub-expression parsers for the new feature.
306 * gcc/cp/semantics.c (finish_requires_expr): Stub.
307 (finish_syntax_requirement): Stub.
308 (finish_type_requirement): Stub.
309 (finish_constexpr_requirement): Stub.
310 (finish_noexcept_requirement): Stub.
311 (finish_requires_expr): Stub.
312 * gcc/cp/cp-tree.h: (finish_requires_expr): New.
313 (finish_syntax_requirement): New.
314 (finsih_type_requirement): New.
315 (finish_constexpr_requirement): New.
316 (finish_noexcept_requirement): New.
318 2013-06-21 Andrew Sutton <andrew.n.sutton@gmail.com>
319 * gcc/cp/error.c (subst_to_string): Allow this to be called explicitly
320 passing template parameters in the TREE_TYPE and with a null
322 * constraint.cc (check_requirements): New overload taking template
324 (check_constraints.cc): Move instantiation and checking into the
325 new check_requirements overload.
326 (diagnose_requirements): New family of functions for diagnosing
329 2013-06-18 Andrew Sutton <andrew.n.sutton@gmail.com>
330 * gcc/cp/class.c (are_constrained_member_overloads): New.
331 (add_method): Allow overloading of constrained member functions.
332 * gcc/cp/call.c (rejection_reason_code): New rr_constraint_failure.
333 (template_constraint_failure): New.
334 (add_function_candidate): Check for viability as a precondition to use.
335 (add_template_candidate_real): Integrate constraint diagnostics.
336 Provide constraint info for new template instantiations.
337 (print_z_candidate): Emit diagnostics for constraint failures.
338 (template_decl_for_candidate): New.
339 (joust): Allow non-member templates of class templates to be evaluated
340 in more_specialized_fn if they are constrained.
341 * gcc/cp/ptree.c (cxx_print_xnode): Dump constraint info.
342 * gcc/cp/semantics.c (finish_template_template_parm): Build template
343 info for template template parameters.
344 (is_unary_trait): New.
345 (is_binary_trait): New.
346 (finish_trait_expr): Check for binary traits using new function.
347 * gcc/cp/constraint.cc (join_requirements): New
348 (conjoin_requirements): Join expressions correctly. Fixed docs.
349 (disjoin_requirements): Removed.
350 (is_constriant): Removed.
351 (resolve_constraint_check): New. Replaces previous get_constraint
352 check and related functions.
353 (get_constraints): New, along with helper functions.
354 (suppress_template_processing): New.
355 (check_template_constraints): New, along with helper functions.
356 (equivalent_constraints): New.
357 (equivalently_constrained): New.
358 (more_constraints): New.
359 (more_constrianed): New.
360 (diagnose_constraint_failure): New.
361 * gcc/cp/decl.c (decls_match): Check for constraint equivalence if
362 the types are the same.
363 (check_concept_refinement): New.
364 (are_constrained_overloads): New.
365 (duplicate_decls): Handle constraints for ambigous declarations. Check
366 and diagnose concept refinement.
367 (check_concept_fn): Don't fail completely just because the concept
368 isn't defined correctly. Allow analysis to continue as if declared
369 constexpr. Concepts must return bool.
370 * gcc/cp/tree.c (bind_template_template_parm): Provide empty
371 constraints for bound template template parameters.
372 * gcc/cp/logic.cc: Rewrite of proof state and related structures and
373 decomposition logic. Removed right-decomposition logic, but retained
375 (match_terms): Renamed from entails.
376 (subsumes_prop): Cleanup, added specific handlers for and/or cases.
377 (subsumes_constraints): Update from interface change.
378 * gcc/cp/cp-tree.h (check_constraint_info): Renamed and applied
380 (check_template_info): Renamed and applied interface change.
381 (cp_unevaluated): New
382 (local_specialization_stack): New.
383 (coerce_template_parms): New.
384 (is_unary_trait): New.
385 (is_binary_trait): New.
386 (get_constraints): New.
387 (check_constraints): New.
388 (check_template_constraints): New.
389 (subst_template_constraints): New.
390 (equivalent_constraints): New.
391 (equivalently_constrained): New.
392 (more_constraints): New.
393 (more_constrained): New.
394 (diagnose_constraints_failure): New.
395 * gcc/cp/cxx-pretty-print.c (pp_cxx_template_declaration): Print the
396 template requirements.
397 * gcc/cp/pt.c (local_specialization_stack): New.
398 (build_template_info): Refactor into 3-argument version and
399 incorporate template requirements.
400 (check_explicit_specialization): Instantiate requirements for
402 (push_template_decl_real): Include constraints in template info.
403 (redeclare_class_template): Diagnose redeclaration with different
405 (is_compatible_template_arg): New.
406 (convert_template_argument): Check constraints on template template
407 arguments and diagnose errors.
408 (lookup_template_class_1): Check constraints on alias templates.
409 Keep constraints with instantiated types.
410 (instantiate_class_template_1): Check constraints on class templates.
411 (tsubst_decl): Instantiate and keep constraints with template info.
412 Also, allow dependent pack arguments to produce neww parameter
413 packs when instantiated.
414 (coerce_template_parms): New overload.
415 (tsubst_copy): Handle REAL_TYPE and BOOLEAN_TYPE.
416 (tsubst_copy_and_build): PARM_DECLs can be instantiated as pack
417 expansions (used with requires expression).
418 (fn_type_unification): Check constraints for function templates.
419 (more_specialized_fn): Determine which candidate is more constrained.
420 (substitute_template_parameters): Removed.
421 (tsubst_constraint): New.
422 (substitute_requirements): New.
423 * gcc/cp/parser.c: (cp_parser_optional) Removed along with helper
425 (cp_unevaluated): New.
426 (cp_parser_type_parameter): Check for requires kw explicitly, and
427 save/clear template requirements before parsing the requires clause.
428 (cp_parser_requires_clause): Removed.
429 (cp_parser_template_declaration_after_exp): Check for requires kw
431 * gcc/system.h (cstdlib): Removed include.
432 * gcc/c-family/c-common.h (D_CXX_CONCEPTS): New flag for disabling
434 * gcc/c-family/c.opt (flag_concepts): Remove redundant declaration.
435 * gcc/c-family/c-common.c (c_common_r): Concept-specific keywords
436 are only enabled when concepts are enabled.
438 2013-06-01 Andrew Sutton <andrew.n.sutton@gmail.com>
439 * gcc/system.h (cstdlib): Include <cstdlib> to avoid poisoned
441 * gcc/c-family/common.c (c_common_r): Added __is_same_as intrinsic,
442 removed previous, unused intrinsics.
443 * gcc/c-family/common.h (rid): Added RID_IS_SAME_AS.
444 * gcc/cp/parser.c (take): New.
445 (cp_requires_clause): New.
446 (cp_requires_clause_opt): New.
448 (cp_parser_optional_if_token): New.
449 (cp_parser_optional_if_not_token): New.
450 (cp_parser_optional_if_keyword): New.
451 (cp_parser_decl_specifier_seq): Parse 'concept' as a declspec.
452 (cp_parser_type_parameter): Parse constrained template template parms.
453 (cp_parser_member_specification_opt): Parse member constraints after
454 the declaration, not before.
455 (cp_parser_template_declaration_after_exp): Rewrote parsing for
456 template requirements
457 (cp_parser_late_parsing_for_member): Re-push the current template
458 requirements when late-parsing member definitions.
459 * gcc/cp/decl.c (check_concept_fn): New.
460 (grokfndecl): Semantics for concept declspec.
461 (grokdeclarator): Semantics for concept declspec.
462 (xref_tag_1): Update to new interface.
463 * gcc/cp/constraint.cc (make_constraints): New.
464 * gcc/cp/cp-objcp-common.c (cp_tree_size): Add case for constraint_info.
465 * gcc/cp/cp-tree.h (require): New.
466 (tree_template_info): Add a field for constraint info.
467 (tree_constraint_info): New.
468 (constraint_info_p): New.
469 (template_info_p): New.
471 (CI_REQUIREMENTS): New.
472 (CI_ASSUMPTIONS): New.
473 (TI_CONSTRAINT): New.
475 (TI_REQUIREMENTS): New.
476 (TI_ASSUMPTIONS): New.
477 (DECL_TEMPLATE_CONSTRAINT): New.
478 (CLASSTYPE_TEMPLATE_CONSTRAINT): New.
479 (ENUM_TEMPLATE_CONSTRAINT): New.
480 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_CONSTRAINT): New.
481 (TYPE_TEMPLATE_CONSTRAINT): New.
482 (cp_tree_node_structure_enum): Added entry for constraint info.
483 (lang_tree_node): Added entry for constraint info.
484 (lang_decl_base): Added bit for concept declarations.
485 (DECL_DECLARED_CONCEPT_P): New.
486 (cp_decl_spec): Added ds_concept declaration specifier.
487 * gcc/cp/Make-lang.in (logic.o): New target.
488 * gcc/cp/semantics.c (finish_template_requirements): Rewrite.
489 * gcc/cp/logic.cc: New
490 * gcc/cp-tree.def (CONSTRAINT_INFO): New node.
491 * gcc/cp/pt.c (current_template_args): Make non-static.
492 (redeclare_class_template): Take constraints as a 3rd argument
494 2013-04-01 Andrew Sutton <andrew.n.sutton@gmail.com>
496 * gcc/cp/Make-lang.in: Add constraints.o target.
497 * gcc/cp/cp-tree.h (substitute_template_parameters): Declare.
498 (instantiate_requirements): Declare.
499 (conjoin_requirements): Declare.
500 (disjoin_requirements): Declare.
501 (reduce_requirements): Declare.
502 * gcc/cp/pt.c (substitute_template_parameters): Define.
503 (instantiate_requirements): Define.
504 * gcc/cp/pt.c (finish_template_requirements): Call
505 reduce_requirements to get constraints.
506 * gcc/cp/parser.c (cp_parser_type_parameter): Restore saved
507 constraints after parsing template template parameter decl.
508 * gcc/cp/constraints.cc: New.
510 2013-03-11 Andrew Sutton <andrew.n.sutton@gmail.com>
511 * gcc/cp/Make-lang.in: Add constraint.c
512 * gcc/cp/constraint.c: New
513 (conjoin_requirements): New
514 (disjoin_requirements): New
515 (requirement_reduction): New class
516 (reduce_requirements): New
517 * gcc/cp/cp-tree.h (reduce_requrements): New
518 (conjoin_requirements): New
519 (disjoin_requirements): New
520 * gcc/cp/cp-tree.h (finish_template_template_parm) Comments.
521 * gcc/cp/semantics.c (finish_template_requirements) Start
522 working with requirements.
525 2013-03-01 Andrew Sutton <andrew.n.sutton@gmail.com>
527 * gcc/cp/cp-tree.h (saved_scope): Add template requirements.
528 (finish_template_requirements): Declare
529 * gcc/cp/parser.c (cp_parser_template_requirement_opt): Declare.
530 (cp_parser_template_declaration): Document grammar extensions.
531 (cp_parser_type_parameter): Parse requirements for template
533 (cp_parser_member_declaration): Parse requirements for
534 members of class templates.
535 (cp_parser_template_requirement_opt): Define.
536 (cp_parser_template_declaration_after_exp): Parse requirements
537 for template declarations.
538 * gcc/cp/semantics.c (finish_template_requirements): Define.
539 * gcc/cp/lex.c (cxx_init): Enable concepts by default.
541 2013-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
543 * lex.c (flag_concepts): Revert left over declaration.
545 2013-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
547 * gcc/c-family/c-common.c (cxx_dialect): Set C++11 as default.
548 * gcc/c-family/c.opt(flag_concepts): Add.
549 * gcc/cp/lex.c (flag_concepts): New. Enabled concept support by
552 2013-02-28 Andrew Sutton <andrew.n.sutton@gmail.com>
554 * gcc/c-family/c-common.h (rid): New resreserved words for concepts.
555 * gcc/c-family/c-common.c (c_common_reswords): Definitions thereof.
556 * gcc/doc/extend.texi (write_symbol): Initial concept docs.