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 // <queue> 11 12 // template <class... Args> void emplace(Args&&... args); 13 14 #include <queue> 15 #include <cassert> 16 17 #include "../../../Emplaceable.h" 18 main()19int main() 20 { 21 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES 22 std::queue<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.front() == Emplaceable(1, 2.5)); 28 assert(q.back() == Emplaceable(3, 4.5)); 29 #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES 30 } 31