dtor_noexcept.pass.cpp 689 B

1234567891011121314151617181920212223242526272829
  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. // <stack>
  9. // ~stack() // implied noexcept;
  10. // UNSUPPORTED: c++98, c++03
  11. #include <stack>
  12. #include <cassert>
  13. #include "test_macros.h"
  14. #include "MoveOnly.h"
  15. int main(int, char**)
  16. {
  17. {
  18. typedef std::stack<MoveOnly> C;
  19. static_assert(std::is_nothrow_destructible<C>::value, "");
  20. }
  21. return 0;
  22. }