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

#127 Generalize conversions between nodes and native data #129

Merged
merged 14 commits into from
Oct 9, 2023

Conversation

fktn-k
Copy link
Owner

@fktn-k fktn-k commented Oct 9, 2023

Conversions between basic_node objects and native data objects have been generalized by newly implemented node_value_converter class.
The node_value_converter delegates converting operations to fkyaml::to_node and fkyaml::from_node fanctor objects which will execute functions implemented for a target native data type with the mechanism of the Argument Dependent Lookup (ADL for short).

User customizations are available by implementing custom to_node()/from_node() OUTSIDE the fkyaml namespace. (maybe in the global namespace.)
The current restriction of the from_node() customization is that target native data types MUST be default constructible.
The restriction above will be fixed in some later PR.

Furthermore, implementations of STL supplementation to use features in C++14 or later has been moved to include/fkYAML/stl_supplement.hpp, which depends on the result of the C++ standard detection executed in include/fkYAML/version_macros.hpp.

@fktn-k fktn-k added this to the Release v0.1.0 milestone Oct 9, 2023
@fktn-k fktn-k self-assigned this Oct 9, 2023
@fktn-k fktn-k added the improvement refactoring or optimization without public API changes label Oct 9, 2023
@fktn-k fktn-k merged commit de6eabf into develop Oct 9, 2023
103 checks passed
@fktn-k fktn-k deleted the feature/127_generalize_node_data_conversions branch October 9, 2023 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement refactoring or optimization without public API changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant