forked from boostorg/variant2
Fix emplace for types with a deleted move constructor (in the not trivially destructible case)
This commit is contained in:
@@ -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