mirror of git://gcc.gnu.org/git/gcc.git
boost_shared_ptr.h (shared_ptr<>::shared_ptr(const __shared_ptr<>&), [...]): Remove.
2006-09-24 Paolo Carlini <pcarlini@suse.de> * include/tr1/boost_shared_ptr.h (shared_ptr<>::shared_ptr(const __shared_ptr<>&), shared_ptr(const __weak_ptr<>&), shared_ptr(const __shared_ptr<>&, __static_cast_tag), shared_ptr(const __shared_ptr<>&, __const_cast_tag), shared_ptr(const __shared_ptr<>&, __dynamic_cast_tag), weak_ptr<>::weak_ptr(const __shared_ptr<>&), weak_ptr(const __weak_ptr<>&)): Remove. (shared_ptr<>::shared_ptr(const shared_ptr<>&), shared_ptr(const weak_ptr<>&), shared_ptr(const shared_ptr<>&, __static_cast_tag), shared_ptr(const shared_ptr<>&, __const_cast_tag), shared_ptr(const shared_ptr<>&, __dynamic_cast_tag), static_pointer_cast(const shared_ptr<>&), const_pointer_cast(const shared_ptr<>&), dynamic_pointer_cast(const shared_ptr<>&), weak_ptr<>::weak_ptr(const shared_ptr<>&), weak_ptr(const weak_ptr<>&), weak_ptr<>::lock(), __enable_shared_from_this_helper(const __shared_count<>&, const enable_shared_from_this<>*, const _Tp2*)): Add. (class enable_shared_from_this): Add. * testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/ 1.cc: New. * testsuite/tr1/2_general_utilities/memory/shared_ptr/casts/1.cc: Likewise. * testsuite/tr1/2_general_utilities/memory/weak_ptr/lock/1.cc: Likewise. * include/tr1/boost_shared_ptr.h: Further formatting and uglification fixes. From-SVN: r117184
This commit is contained in:
parent
af17634547
commit
c8bd30ddb3
|
@ -1,3 +1,33 @@
|
|||
2006-09-24 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
* include/tr1/boost_shared_ptr.h (shared_ptr<>::shared_ptr(const
|
||||
__shared_ptr<>&), shared_ptr(const __weak_ptr<>&),
|
||||
shared_ptr(const __shared_ptr<>&, __static_cast_tag),
|
||||
shared_ptr(const __shared_ptr<>&, __const_cast_tag),
|
||||
shared_ptr(const __shared_ptr<>&, __dynamic_cast_tag),
|
||||
weak_ptr<>::weak_ptr(const __shared_ptr<>&), weak_ptr(const
|
||||
__weak_ptr<>&)): Remove.
|
||||
(shared_ptr<>::shared_ptr(const shared_ptr<>&),
|
||||
shared_ptr(const weak_ptr<>&), shared_ptr(const shared_ptr<>&,
|
||||
__static_cast_tag), shared_ptr(const shared_ptr<>&,
|
||||
__const_cast_tag), shared_ptr(const shared_ptr<>&,
|
||||
__dynamic_cast_tag), static_pointer_cast(const shared_ptr<>&),
|
||||
const_pointer_cast(const shared_ptr<>&), dynamic_pointer_cast(const
|
||||
shared_ptr<>&), weak_ptr<>::weak_ptr(const shared_ptr<>&),
|
||||
weak_ptr(const weak_ptr<>&), weak_ptr<>::lock(),
|
||||
__enable_shared_from_this_helper(const __shared_count<>&, const
|
||||
enable_shared_from_this<>*, const _Tp2*)): Add.
|
||||
(class enable_shared_from_this): Add.
|
||||
* testsuite/tr1/2_general_utilities/memory/enable_shared_from_this/
|
||||
1.cc: New.
|
||||
* testsuite/tr1/2_general_utilities/memory/shared_ptr/casts/1.cc:
|
||||
Likewise.
|
||||
* testsuite/tr1/2_general_utilities/memory/weak_ptr/lock/1.cc:
|
||||
Likewise.
|
||||
|
||||
* include/tr1/boost_shared_ptr.h: Further formatting and
|
||||
uglification fixes.
|
||||
|
||||
2006-09-22 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
PR libstdc++/29134 (vector<bool> bits)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,39 @@
|
|||
// 2006-09-24 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation
|
||||
//
|
||||
// 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 2, 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 COPYING. If not, write to the Free
|
||||
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
// USA.
|
||||
|
||||
// 2.2.5 Template class enable_shared_from_this [tr.util.smartptr.enab]
|
||||
|
||||
#include <tr1/memory>
|
||||
#include <testsuite_tr1.h>
|
||||
|
||||
// { dg-do compile }
|
||||
|
||||
struct X : public std::tr1::enable_shared_from_this<X>
|
||||
{
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
using __gnu_test::check_ret_type;
|
||||
using std::tr1::shared_ptr;
|
||||
|
||||
shared_ptr<X> spx(new X);
|
||||
check_ret_type<shared_ptr<X> >(spx->shared_from_this());
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
// 2006-09-24 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation
|
||||
//
|
||||
// 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 2, 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 COPYING. If not, write to the Free
|
||||
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
// USA.
|
||||
|
||||
// TR1 2.2.3.9 shared_ptr casts [tr.util.smartptr.shared.cast]
|
||||
|
||||
#include <tr1/memory>
|
||||
#include <testsuite_tr1.h>
|
||||
|
||||
// { dg-do compile }
|
||||
|
||||
struct MyP { virtual ~MyP() { }; };
|
||||
struct MyDP : MyP { };
|
||||
|
||||
int main()
|
||||
{
|
||||
using __gnu_test::check_ret_type;
|
||||
using std::tr1::shared_ptr;
|
||||
using std::tr1::static_pointer_cast;
|
||||
using std::tr1::const_pointer_cast;
|
||||
using std::tr1::dynamic_pointer_cast;
|
||||
|
||||
shared_ptr<double> spd;
|
||||
shared_ptr<const int> spci;
|
||||
shared_ptr<MyP> spa;
|
||||
|
||||
check_ret_type<shared_ptr<void> >(static_pointer_cast<void>(spd));
|
||||
check_ret_type<shared_ptr<int> >(const_pointer_cast<int>(spci));
|
||||
check_ret_type<shared_ptr<MyDP> >(static_pointer_cast<MyDP>(spa));
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
// 2006-09-24 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation
|
||||
//
|
||||
// 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 2, 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 COPYING. If not, write to the Free
|
||||
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
// USA.
|
||||
|
||||
// TR1 2.2.4 Template class weak_ptr [tr.util.smartptr.weak]
|
||||
|
||||
#include <tr1/memory>
|
||||
#include <testsuite_tr1.h>
|
||||
|
||||
// { dg-do compile }
|
||||
|
||||
int main()
|
||||
{
|
||||
using __gnu_test::check_ret_type;
|
||||
using std::tr1::weak_ptr;
|
||||
using std::tr1::shared_ptr;
|
||||
|
||||
weak_ptr<int> wp;
|
||||
check_ret_type<shared_ptr<int> >(wp.lock());
|
||||
}
|
Loading…
Reference in New Issue