forked from boostorg/variant2
Fix emplace for types with a deleted move constructor (in the not trivially destructible case)
This commit is contained in:
1 parent
9f7e525984
commit
2d6385031e
2 files changed
+59
-39
No files matched your search
@@ -61,6 +61,11 @@ struct Y1
|
||||
{
|
||||
};
|
||||
|
||||
struct Y2
|
||||
{
|
||||
~Y2() {}
|
||||
};
|
||||
|
||||
struct Guard
|
||||
{
|
||||
explicit Guard(int) {}
|
||||
@@ -180,5 +185,10 @@ int main()
|
||||
v.emplace<Guard>( 1 );
|
||||
}
|
||||
|
||||
{
|
||||
variant<Y2, Guard> v;
|
||||
v.emplace<Guard>( 1 );
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
Reference in new issue
Block a user