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

Catching an exception from the move constructor destroys the original data #5

Closed
zrax opened this issue Feb 2, 2017 · 1 comment
Closed

Comments

@zrax
Copy link
Owner

zrax commented Feb 2, 2017

Discovered while working on a fix for H-uru/libhsplasma#97:

ST::string foo;
ST::char_buffer init = {...};
try {
    foo = init;
} catch (ST::unicode_error &) {
    // init is now empty due to move constructor
}
@zrax
Copy link
Owner Author

zrax commented Feb 2, 2017

Fixed with 5c774d2, to be included in 1.5

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

No branches or pull requests

1 participant