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

utree: Fixed double conversion #462

Merged
merged 1 commit into from Feb 14, 2019

Conversation

Projects
None yet
1 participant
@Kojoley
Copy link
Collaborator

commented Feb 13, 2019

The double conversion spirit::string -> std::string -> spirit::string was
happening silently in rules because of transform_attribute was returning
std::string and implicit constructor in spirit::string.

The mistake could be prevented if spirit::basic_string constructor from
derived class was explicit, but utree_cast uses is_convertible while
is_constructible is not implemented for C++03 (it is possible, but requires
expression SFINAE support from compiler - N2634).

utree: Fixed double conversion
The double conversion `spirit::string -> std::string -> spirit::string` was
happening silently in rules because of `transform_attribute` was returning
`std::string` and implicit constructor in `spirit::string`.

The mistake could be prevented if `spirit::basic_string` constructor from
derived class was explicit, but `utree_cast` uses `is_convertible` while
`is_constructible` is not implemented for C++03 (it is possible, but requires
expression SFINAE support from compiler - N2634).

@Kojoley Kojoley merged commit e979d61 into boostorg:develop Feb 14, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Kojoley Kojoley deleted the Kojoley:utree-fix-double-conversion branch Feb 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.