diff options
Diffstat (limited to 'test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp')
-rw-r--r-- | test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp b/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp new file mode 100644 index 000000000000..fa5243e322bf --- /dev/null +++ b/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp @@ -0,0 +1,29 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// <list> + +// void splice(const_iterator position, list<T,Allocator>& x, iterator i); + +#define _LIBCPP_DEBUG 1 +#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) + +#include <list> +#include <cstdlib> +#include <cassert> + +int main() +{ + { + std::list<int> v1(3); + std::list<int> v2(3); + v1.splice(v1.begin(), v2, v1.begin()); + assert(false); + } +} |