Daily bump.
[gcc.git] / libstdc++-v3 / testsuite / 23_containers / deque / modifiers / emplace / 90389.cc
blobb4932498700b1686a1e5a25eb4ca5121407ec670
1 // { dg-do run { target c++11 } }
3 // Bug 90389 - std::deque::emplace tries to call wrong overload internally
5 #include <deque>
6 #include <testsuite_hooks.h>
8 struct X
10 X() = default;
11 X(void*, void*, std::size_t) { }
14 void
15 test_pr90389()
17 const int n = 3;
18 std::deque<X> d(n);
19 d.emplace(d.begin(), nullptr, nullptr, d.size());
20 VERIFY( d.size() == n+1 );
23 struct Y
25 Y() = default;
26 Y(std::size_t, const Y&) { }
29 void
30 test_pr118079()
32 const int n = 3;
33 std::deque<Y> d(n);
34 const Y y{};
35 d.emplace(d.begin(), d.size(), y);
36 VERIFY( d.size() == n+1 );
39 int main()
41 test_pr90389();
42 test_pr118079();