Fix emplace for types with a deleted move constructor (in the not trivially destructible case)

This commit is contained in:
Peter Dimov committed 2019-04-09 19:22:04 +03:00
1 parent 9f7e525984
commit 2d6385031e
2 files changed
+59 -39

No files matched your search

+10
View File
@@ -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();
}