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++03 10 11 // <queue> 12 13 // priority_queue(); 14 15 // void push(value_type&& v); 16 17 #include <queue> 18 #include <cassert> 19 20 #include "test_macros.h" 21 #include "MoveOnly.h" 22 main(int,char **)23int main(int, char**) 24 { 25 std::priority_queue<MoveOnly> q; 26 q.push(1); 27 assert(q.top() == 1); 28 q.push(3); 29 assert(q.top() == 3); 30 q.push(2); 31 assert(q.top() == 3); 32 33 return 0; 34 } 35