Skip to content

Simplify attribute traits#71

Merged
saki7 merged 1 commit intoboostorg:developfrom
saki7:simplify-attribute-traits
Oct 7, 2025
Merged

Simplify attribute traits#71
saki7 merged 1 commit intoboostorg:developfrom
saki7:simplify-attribute-traits

Conversation

@saki7
Copy link
Collaborator

@saki7 saki7 commented Oct 7, 2025

Part of #1
cc: @yaito3014

The old implementation had unnecessary class Context parameter for many core traits, which were never being used since its very first introduction 12 years ago. We will not support such premature customization points in X4 and they were considered the contribution barrier for improving core components.

The only remaining attributes in X4 that are deduced dynamically at parse time are the classes that are controlled by traits::pseudo_attribute.

  • traits::attribute_of: removed in favor of parser_traits<Parser>::attribute_type
  • traits::has_attribute: removed in favor of parser_traits<Parser>::has_attribute
  • traits::attribute_type: removed; fusion ADT adapters will not be supported in X4
  • traits::pseudo_attribute: moved to core/attribute.hpp
  • static bool has_attribute = ...;: redundant definition removed from parsers, only the truly needed ones remain
  • static bool handles_container = ...;: redundant definition removed from parsers, only the truly needed ones remain
  • static bool is_pass_through_unary = true;: removed in favor of struct x4::proxy_parser

@saki7 saki7 self-assigned this Oct 7, 2025
@saki7 saki7 added the enhancement New feature or request label Oct 7, 2025
@saki7 saki7 marked this pull request as ready for review October 7, 2025 23:11
@saki7 saki7 mentioned this pull request Oct 7, 2025
@saki7 saki7 merged commit dfddbbb into boostorg:develop Oct 7, 2025
13 checks passed
@saki7 saki7 deleted the simplify-attribute-traits branch October 7, 2025 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant