Home | History | Annotate | Download | only in priqueue.members
      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 // priority_queue();
     13 
     14 // void push(value_type&& v);
     15 
     16 #include <queue>
     17 #include <cassert>
     18 
     19 #include "../../../MoveOnly.h"
     20 
     21 int main()
     22 {
     23 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     24     std::priority_queue<MoveOnly> q;
     25     q.push(1);
     26     assert(q.top() == 1);
     27     q.push(3);
     28     assert(q.top() == 3);
     29     q.push(2);
     30     assert(q.top() == 3);
     31 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
     32 }
     33