1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // <stack>
11 
12 // template <class... Args> void emplace(Args&&... args);
13 
14 #include <stack>
15 #include <cassert>
16 
17 #include "../../../Emplaceable.h"
18 
main()19 int main()
20 {
21 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
22     std::stack<Emplaceable> q;
23     q.emplace(1, 2.5);
24     q.emplace(2, 3.5);
25     q.emplace(3, 4.5);
26     assert(q.size() == 3);
27     assert(q.top() == Emplaceable(3, 4.5));
28 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
29 }
30