move_noexcept.pass.cpp (825B)
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(priority_queue&&) 15 // noexcept(is_nothrow_move_constructible<container_type>::value && 16 // is_nothrow_move_constructible<Compare>::value); 17 18 // This tests a conforming extension 19 20 #include <queue> 21 #include <cassert> 22 23 #include "MoveOnly.h" 24 25 int main() 26 { 27 { 28 typedef std::priority_queue<MoveOnly> C; 29 static_assert(std::is_nothrow_move_constructible<C>::value, ""); 30 } 31 }