Implement P0258R2 - helper for C++17 std::has_unique_object_representations trait c-family/ * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS. * c-common.c (c_common_reswords): Add __has_unique_object_representations. cp/ * cp-tree.h (enum cp_trait_kind): Add CPTK_HAS_UNIQUE_OBJ_REPRESENTATIONS. (struct lang_type_class): Add unique_obj_representations and unique_obj_representations_set bitfields. (CLASSTYPE_UNIQUE_OBJ_REPRESENTATIONS, CLASSTYPE_UNIQUE_OBJ_REPRESENTATIONS_SET): Define. (type_has_unique_obj_representations): Declare. * parser.c (cp_parser_primary_expression): Handle RID_HAS_UNIQUE_OBJ_REPRESENTATIONS. (cp_parser_trait_expr): Likewise. Formatting fix. * semantics.c (trait_expr_value, finish_trait_expr): Handle CPTK_HAS_UNIQUE_OBJ_REPRESENTATIONS. * tree.c (type_has_unique_obj_representations): New function. (record_has_unique_obj_representations): New function. * cxx-pretty-print.c (pp_cxx_trait_expression): Handle CPTK_HAS_UNIQUE_OBJ_REPRESENTATIONS. testsuite/ * g++.dg/cpp1z/has-unique-obj-representations1.C: New test. * g++.dg/cpp1z/has-unique-obj-representations2.C: New test. From-SVN: r240843
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
ChangeLog | Loading commit data... | |
ChangeLog.gimple-classes | Loading commit data... | |
array-notation-common.c | Loading commit data... | |
c-ada-spec.c | Loading commit data... | |
c-ada-spec.h | Loading commit data... | |
c-cilkplus.c | Loading commit data... | |
c-common.c | Loading commit data... | |
c-common.def | Loading commit data... | |
c-common.h | Loading commit data... | |
c-cppbuiltin.c | Loading commit data... | |
c-dump.c | Loading commit data... | |
c-format.c | Loading commit data... | |
c-format.h | Loading commit data... | |
c-gimplify.c | Loading commit data... | |
c-indentation.c | Loading commit data... | |
c-indentation.h | Loading commit data... | |
c-lex.c | Loading commit data... | |
c-objc.h | Loading commit data... | |
c-omp.c | Loading commit data... | |
c-opts.c | Loading commit data... | |
c-pch.c | Loading commit data... | |
c-ppoutput.c | Loading commit data... | |
c-pragma.c | Loading commit data... | |
c-pragma.h | Loading commit data... | |
c-pretty-print.c | Loading commit data... | |
c-pretty-print.h | Loading commit data... | |
c-semantics.c | Loading commit data... | |
c-target-def.h | Loading commit data... | |
c-target.def | Loading commit data... | |
c-target.h | Loading commit data... | |
c-ubsan.c | Loading commit data... | |
c-ubsan.h | Loading commit data... | |
c.opt | Loading commit data... | |
cilk.c | Loading commit data... | |
cppspec.c | Loading commit data... | |
stub-objc.c | Loading commit data... |