11590Srgrimes// Copyright (C) 2014-2015 Free Software Foundation, Inc. 21590Srgrimes// 31590Srgrimes// This file is part of the GNU ISO C++ Library. This library is free 41590Srgrimes// software; you can redistribute it and/or modify it under the 51590Srgrimes// terms of the GNU General Public License as published by the 61590Srgrimes// Free Software Foundation; either version 3, or (at your option) 71590Srgrimes// any later version. 81590Srgrimes// 91590Srgrimes// This library is distributed in the hope that it will be useful, 101590Srgrimes// but WITHOUT ANY WARRANTY; without even the implied warranty of 111590Srgrimes// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 121590Srgrimes// GNU General Public License for more details. 131590Srgrimes// 141590Srgrimes// You should have received a copy of the GNU General Public License along 151590Srgrimes// with this library; see the file COPYING3. If not see 161590Srgrimes// <http://www.gnu.org/licenses/>. 171590Srgrimes// 181590Srgrimes// { dg-options "-std=gnu++11" } 191590Srgrimes// { dg-do run { xfail *-*-* } } 201590Srgrimes 211590Srgrimes#include <debug/map> 221590Srgrimes#include <testsuite_allocator.h> 231590Srgrimes 241590Srgrimesvoid test01() 251590Srgrimes{ 261590Srgrimes bool test __attribute__((unused)) = true; 271590Srgrimes 281590Srgrimes typedef __gnu_test::propagating_allocator<std::pair<const int, int>, 291590Srgrimes false> alloc_type; 301590Srgrimes typedef __gnu_debug::map<int, int, std::less<int>, alloc_type> test_type; 311590Srgrimes 3287217Smarkm test_type v1(alloc_type(1)); 3387217Smarkm v1.insert(std::make_pair(0, 0)); 341590Srgrimes auto it = v1.begin(); 351590Srgrimes 361590Srgrimes test_type v2(alloc_type(2)); 3787217Smarkm v2.insert(std::make_pair(1, 1)); 381590Srgrimes 391590Srgrimes v2 = std::move(v1); 401590Srgrimes 411590Srgrimes VERIFY( it == v2.begin() ); // Error, it is singular. 421590Srgrimes} 4387217Smarkm 441590Srgrimesint main() 451590Srgrimes{ 4687217Smarkm test01(); 4798467Sjmallett return 0; 481590Srgrimes} 4987217Smarkm