1 //===----------------------------------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 // UNSUPPORTED: c++98, c++03 10 11 // <queue> 12 13 // priority_queue(); 14 15 // template <class... Args> void emplace(Args&&... args); 16 17 #include <queue> 18 #include <cassert> 19 20 #include "../../../Emplaceable.h" 21 22 int main(int, char**) 23 { 24 std::priority_queue<Emplaceable> q; 25 q.emplace(1, 2.5); 26 assert(q.top() == Emplaceable(1, 2.5)); 27 q.emplace(3, 4.5); 28 assert(q.top() == Emplaceable(3, 4.5)); 29 q.emplace(2, 3.5); 30 assert(q.top() == Emplaceable(3, 4.5)); 31 32 return 0; 33 } 34