brintos

brintos / llvm-project-archived public Read only

0
0
Text · 809 B · d0f69a2 Raw
34 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++0310 11// <stack>12 13// stack(stack&&)14//        noexcept(is_nothrow_move_constructible<container_type>::value);15 16// This tests a conforming extension17 18#include <stack>19#include <cassert>20 21#include "test_macros.h"22#include "MoveOnly.h"23 24int main(int, char**) {25#if defined(_LIBCPP_VERSION)26  {27    typedef std::stack<MoveOnly> C;28    static_assert(std::is_nothrow_move_constructible<C>::value, "");29  }30#endif31 32  return 0;33}34