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

exception in constructor #21

Closed
kkaefer opened this issue Jun 23, 2014 · 2 comments
Closed

exception in constructor #21

kkaefer opened this issue Jun 23, 2014 · 2 comments
Assignees
Labels

Comments

@kkaefer
Copy link
Contributor

kkaefer commented Jun 23, 2014

I seems like

variant/variant.hpp

Lines 480 to 481 in 2d8ca78

new (&data) T(std::forward<Args>(args)...);
type_index = detail::type_traits<T,Types...>::id;
has an error: when the constructor returns an exception, type_index still has the old type information stored. When running .set() again, it tries to delete the current content of the variant again.

@artemp
Copy link
Contributor

artemp commented Jun 23, 2014

@kkaefer - thanks for tracking this down!

@artemp artemp self-assigned this Jun 23, 2014
joto added a commit that referenced this issue Jan 13, 2016
@joto joto added the bug label Jan 13, 2016
@joto
Copy link
Contributor

joto commented Jan 13, 2016

I have added a test case for this still unfixed issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants