1 From fffee2aba06d51178d5c653db0acd6c775a0326b Mon Sep 17 00:00:00 2001
2 From: paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
3 Date: Sat, 16 Apr 2011 02:04:56 +0000
4 Subject: [PATCH 130/200] 2011-04-15 Daniel Krugler <daniel.kruegler@googlemail.com>
5 Paolo Carlini <paolo.carlini@oracle.com>
8 * include/bits/unique_ptr.h (default_delete<_Tp[]>): Add deleted
9 function call operator.
10 * testsuite/20_util/default_delete/48631_neg.cc: New.
11 * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-error
15 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172535 138bc75d-0d04-0410-961f-82ee72b054a4
17 index 1be2e7a..9ab1938 100644
18 --- a/libstdc++-v3/include/bits/unique_ptr.h
19 +++ b/libstdc++-v3/include/bits/unique_ptr.h
20 @@ -79,6 +79,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
21 "can't delete pointer to incomplete type");
25 + template<typename _Up> void operator()(_Up*) const = delete;
28 /// 20.7.12.2 unique_ptr for single objects.
29 diff --git a/libstdc++-v3/testsuite/20_util/default_delete/48631_neg.cc b/libstdc++-v3/testsuite/20_util/default_delete/48631_neg.cc
31 index 0000000..9d779ac
33 +++ b/libstdc++-v3/testsuite/20_util/default_delete/48631_neg.cc
35 +// { dg-options "-std=gnu++0x " }
38 +// Copyright (C) 2011 Free Software Foundation
40 +// This file is part of the GNU ISO C++ Library. This library is free
41 +// software; you can redistribute it and/or modify it under the
42 +// terms of the GNU General Public License as published by the
43 +// Free Software Foundation; either version 3, or (at your option)
44 +// any later version.
46 +// This library is distributed in the hope that it will be useful,
47 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
48 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49 +// GNU General Public License for more details.
51 +// You should have received a copy of the GNU General Public License along
52 +// with this library; see the file COPYING3. If not see
53 +// <http://www.gnu.org/licenses/>.
62 +std::default_delete<B[]> db;
63 +typedef decltype(db(&d)) type; // { dg-error "use of deleted function" }
64 +// { dg-error "declared here" "" { target *-*-* } 83 }
65 diff --git a/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc b/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc
66 index 28c8797..63f44d1 100644
67 --- a/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc
68 +++ b/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc
69 @@ -44,7 +44,7 @@ main()
71 // { dg-warning "note" "" { target *-*-* } 354 }
72 // { dg-warning "note" "" { target *-*-* } 1086 }
73 -// { dg-warning "note" "" { target *-*-* } 467 }
74 +// { dg-warning "note" "" { target *-*-* } 469 }
75 // { dg-warning "note" "" { target *-*-* } 587 }
76 // { dg-warning "note" "" { target *-*-* } 1050 }
77 // { dg-warning "note" "" { target *-*-* } 1056 }