blob: 5d43bd1238649fd63b08a260e36d1ada770ac094 [file] [log] [blame]
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <list>
// iterator insert(const_iterator position, value_type&& x);
#include <list>
#include <cassert>
#include "../../../MoveOnly.h"
int main()
{
#ifdef _LIBCPP_MOVE
std::list<MoveOnly> l1;
l1.insert(l1.cend(), MoveOnly(1));
assert(l1.size() == 1);
assert(l1.front() == MoveOnly(1));
l1.insert(l1.cbegin(), MoveOnly(2));
assert(l1.size() == 2);
assert(l1.front() == MoveOnly(2));
assert(l1.back() == MoveOnly(1));
#endif // _LIBCPP_MOVE
}