Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++: Generating constructors for union types #335

Closed
wants to merge 2 commits into from

Conversation

JLReitz
Copy link

@JLReitz JLReitz commented May 28, 2024

  • Added "tag-type" initialization constructors to union composite message classes
    • in_place_type_t constructors generated for c++17 and cetl++14-17 variant instances, omitted for c++14
    • in_place_index_t constructors generated for all c++ versions and flavors
  • Symbol rhs has been replaced by a configured token across C++ operator and constructor overloads

@JLReitz JLReitz marked this pull request as ready for review May 28, 2024 18:03
@JLReitz JLReitz marked this pull request as draft June 21, 2024 18:05
- Added "tag-type" initialization constructors to union composite message classes
- Initialization expression for union_value member of union composite types is now generated, with appropriate parameters, in copy and move constructors with allocators
- Union composite message classes hold reference to allocator from construction, passes to allocator-dependent fields when initialized
- Replaced alternative index hardcoding in C++14 union VariantType internal logic with IndexOf property
- Symbol `rhs` has been replaced by a configured token across C++ operator and constructor overloads
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants