From: redi Date: Mon, 30 May 2011 23:46:13 +0000 (+0000) Subject: 2011-05-31 Jonathan Wakely X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=f982b10d5ad27588a1a3246356b9932f6eed00bc 2011-05-31 Jonathan Wakely * include/std/tuple: Restore is_convertible constraint. * testsuite/20_util/tuple/cons/allocate_noncopyable.cc: Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174458 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e55103ed74b..e5fd280b1ed 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2011-05-31 Jonathan Wakely + + * include/std/tuple: Restore is_convertible constraint. + * testsuite/20_util/tuple/cons/allocate_noncopyable.cc: Remove. + 2011-05-30 Paolo Carlini PR libstdc++/49236 diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index a0e9e694dc2..f8ec271c1c5 100644 --- a/libstdc++-v3/include/std/tuple +++ b/libstdc++-v3/include/std/tuple @@ -629,7 +629,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _Inherited(__a1) { } template::value>::type> + std::enable_if::value>::type> explicit tuple(_U1&& __a1) : _Inherited(std::forward<_U1>(__a1)) { } diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/allocate_noncopyable.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/allocate_noncopyable.cc deleted file mode 100644 index d729178b609..00000000000 --- a/libstdc++-v3/testsuite/20_util/tuple/cons/allocate_noncopyable.cc +++ /dev/null @@ -1,73 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// { dg-do compile } - -// Copyright (C) 2011 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -// 20.4.2.1 [tuple.cnstr] Allocator-extended constructors - -#include -#include - -struct MyAlloc { }; - -struct Tag0 { }; -struct Tag1 { }; -struct Tag2 { }; - -// A non-copyable and non-movable type -struct Type -{ - typedef MyAlloc allocator_type; - - explicit Type(Tag0) { } - Type(std::allocator_arg_t, MyAlloc, Tag1) { } - Type(Tag2, MyAlloc) { } - - Type(const Type&) = delete; - Type(Type&&) = delete; - Type& operator=(const Type&) = delete; - Type& operator=(Type&&) = delete; -}; - -void test01() -{ - using std::allocator_arg; - using std::tuple; - - MyAlloc a; - Tag0 tag0; - Tag1 tag1; - Tag2 tag2; - - // N.B. cannot use Tag0 with uses-allocator construction, because - // uses_allocator is true but no suitable cosntructor - tuple t1(tag0); - - tuple t2(allocator_arg, a, tag1); - tuple t3(allocator_arg, a, tag2); - - tuple t4(allocator_arg, a, tag1, tag2); - - tuple t5(allocator_arg, a, tag2, tag1, tag2); -} - -int main() -{ - test01(); - return 0; -}