Associate requirements with declarations. This introduces a new node (constraint-info) stores requirements and (eventually) decomposed assumptions for all C++ declaration types. Template constraints are associated with template declarations (including aliases and template template parameters) and non-template member functions.
2013-04-03 Andrew Sutton <andrew.n.sut...@gmail.com> * gcc/cp/cp-tree.def (CONSTRAINT_INFO): New node * gcc/cp/cp-tree.h (require): New (tree_constraint_info): New node type (constraint_info_p): New (cp_tree_node_structure_enum): New value TP_CONSTRAINT_INFO (lang_tree_node): New member, constraint_info (lang_decl): New member, constraint_info (decl_constrained_p): New (decl_constraints): New (make_constraints): New * semantics.c (finish_template_template_parm): Set requirements for new template declaration (finish_templtae_requirements): Build constraints from a the required expression * pt.c (build_template_decl): New parameter reqs. Associate requiremetns with the new template decl (push_template_decl_real): Build template decl with requirements (add_inherited_template_parms): Build template decl without requiremnts * decl.c (cp_tree_node_structure): Include CONSTRAINT_INFO in * constraint.cc (join_requirements): New (conjoin_requirements): Return exacttly one expr if either is null (disjoin_requirements): Likewise (make_constraints): New * ptree.c (cxx_print_decl): Print constraints (cxx_print_xnode): Print constraint info * cp-objcp-common.c (cp_tree_size): Include CONSTRAINT_INFO in switch
req-assoc.patch
Description: Binary data