Skip to content

feat: Variant parameters#2469

Open
trisyoungs wants to merge 17 commits into
develop2from
dissolve2/variant-parameters
Open

feat: Variant parameters#2469
trisyoungs wants to merge 17 commits into
develop2from
dissolve2/variant-parameters

Conversation

@trisyoungs
Copy link
Copy Markdown
Member

@trisyoungs trisyoungs commented May 31, 2026

This PR attempts to allow std::variant as a workable Parameter data type, driven from the need to use SetCellNode to work on both Configurations as well as Structures. To neaten things up at the end I introduced VariantParameterData (see nodes/parameter.h) to tidy things up and force the use of std::monostate as the first alternative in the variant.

TODO

  • Assigning a std::variant-based Parameter currently fails - needs a refactor to be able to switch to using a setter on the variant (source) Parameter rather than a getter from the destination Parameter.
  • Empty type (because our std::variant can be empty?
  • Unit tests

Comment thread src/nodes/parameter.h Outdated
@trisyoungs trisyoungs force-pushed the dissolve2/reinstate-ff-tests branch from 4a24122 to d04647f Compare June 2, 2026 08:20
@trisyoungs trisyoungs force-pushed the dissolve2/reinstate-ff-tests branch from d04647f to 1c14170 Compare June 2, 2026 16:41
Base automatically changed from dissolve2/reinstate-ff-tests to develop2 June 3, 2026 11:38
@trisyoungs trisyoungs force-pushed the dissolve2/variant-parameters branch from fffbeb7 to f3887d3 Compare June 3, 2026 11:53
@trisyoungs trisyoungs marked this pull request as ready for review June 3, 2026 14:16
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.

2 participants