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 // UNSUPPORTED: c++98, c++03
     11 
     12 // <queue>
     13 
     14 // priority_queue();
     15 
     16 // void push(value_type&& v);
     17 
     18 #include <queue>
     19 #include <cassert>
     20 
     21 #include "MoveOnly.h"
     22 
     23 int main()
     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