diff options
author | Eric Fiselier <eric@efcs.ca> | 2014-12-20 01:40:03 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2014-12-20 01:40:03 +0000 |
commit | a90c6dd46005b2b14de3bb889a8d03bb34bd3256 (patch) | |
tree | 81065ae44967d68964de1f2fdfa107623e58e8a4 /test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp | |
parent | 669a8a5a1929e881258bfed10d7461ca42ea0a9e (diff) | |
download | external_libcxx-a90c6dd46005b2b14de3bb889a8d03bb34bd3256.tar.gz external_libcxx-a90c6dd46005b2b14de3bb889a8d03bb34bd3256.tar.bz2 external_libcxx-a90c6dd46005b2b14de3bb889a8d03bb34bd3256.zip |
Move test into test/std subdirectory.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224658 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp')
-rw-r--r-- | test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp b/test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp new file mode 100644 index 000000000..658af1a89 --- /dev/null +++ b/test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp @@ -0,0 +1,51 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <set> + +// ~multiset() // implied noexcept; + +#include <set> +#include <cassert> + +#include "../../../MoveOnly.h" +#include "test_allocator.h" + +#if __has_feature(cxx_noexcept) + +template <class T> +struct some_comp +{ + typedef T value_type; + ~some_comp() noexcept(false); +}; + +#endif + +int main() +{ +#if __has_feature(cxx_noexcept) + { + typedef std::multiset<MoveOnly> C; + static_assert(std::is_nothrow_destructible<C>::value, ""); + } + { + typedef std::multiset<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C; + static_assert(std::is_nothrow_destructible<C>::value, ""); + } + { + typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C; + static_assert(std::is_nothrow_destructible<C>::value, ""); + } + { + typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C; + static_assert(!std::is_nothrow_destructible<C>::value, ""); + } +#endif +} |