diff options
Diffstat (limited to 'libcxx/test/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp')
-rw-r--r-- | libcxx/test/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/libcxx/test/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp b/libcxx/test/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp index c91909e7224..7af44261b43 100644 --- a/libcxx/test/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp +++ b/libcxx/test/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp @@ -35,13 +35,15 @@ int main() assert(m.begin()->first == 0); assert(m.begin()->second == DefaultOnly()); assert(DefaultOnly::count == 1); - r = m.emplace(1); + r = m.emplace(std::piecewise_construct, std::forward_as_tuple(1), + std::forward_as_tuple()); assert(r == next(m.begin())); assert(m.size() == 2); assert(next(m.begin())->first == 1); assert(next(m.begin())->second == DefaultOnly()); assert(DefaultOnly::count == 2); - r = m.emplace(1); + r = m.emplace(std::piecewise_construct, std::forward_as_tuple(1), + std::forward_as_tuple()); assert(r == next(m.begin(), 2)); assert(m.size() == 3); assert(next(m.begin(), 2)->first == 1); @@ -53,7 +55,8 @@ int main() typedef std::multimap<int, Emplaceable> M; typedef M::iterator R; M m; - R r = m.emplace(2); + R r = m.emplace(std::piecewise_construct, std::forward_as_tuple(2), + std::forward_as_tuple()); assert(r == m.begin()); assert(m.size() == 1); assert(m.begin()->first == 2); @@ -93,13 +96,15 @@ int main() assert(m.begin()->first == 0); assert(m.begin()->second == DefaultOnly()); assert(DefaultOnly::count == 1); - r = m.emplace(1); + r = m.emplace(std::piecewise_construct, std::forward_as_tuple(1), + std::forward_as_tuple()); assert(r == next(m.begin())); assert(m.size() == 2); assert(next(m.begin())->first == 1); assert(next(m.begin())->second == DefaultOnly()); assert(DefaultOnly::count == 2); - r = m.emplace(1); + r = m.emplace(std::piecewise_construct, std::forward_as_tuple(1), + std::forward_as_tuple()); assert(r == next(m.begin(), 2)); assert(m.size() == 3); assert(next(m.begin(), 2)->first == 1); @@ -111,7 +116,8 @@ int main() typedef std::multimap<int, Emplaceable, std::less<int>, min_allocator<std::pair<const int, Emplaceable>>> M; typedef M::iterator R; M m; - R r = m.emplace(2); + R r = m.emplace(std::piecewise_construct, std::forward_as_tuple(2), + std::forward_as_tuple()); assert(r == m.begin()); assert(m.size() == 1); assert(m.begin()->first == 2); |