mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-18 09:56:07 +08:00
Working. No move functionality.
This commit is contained in:
parent
34479a3e31
commit
f4060bc9ea
@ -199,9 +199,9 @@ namespace etl
|
||||
type_id = variant_npos;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
//***************************************************************************
|
||||
/// Emplace with variadic constructor parameters.
|
||||
//*************************************************************************
|
||||
//***************************************************************************
|
||||
template <typename T, typename... TArgs>
|
||||
T& emplace(TArgs&&... args)
|
||||
{
|
||||
|
||||
@ -382,13 +382,16 @@ namespace
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
D1 getD1()
|
||||
{
|
||||
return D1("1");
|
||||
}
|
||||
|
||||
TEST(test_move)
|
||||
{
|
||||
test_variant_emplace variant;
|
||||
|
||||
D1 da("1");
|
||||
|
||||
variant = da;
|
||||
|
||||
test_variant_emplace variant(etl::move(getD1()));
|
||||
|
||||
D1 db = etl::move(etl::get<D1>(variant));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user