mirror of git://gcc.gnu.org/git/gcc.git
c++config (_GLIBCXX_DEPRECATED): To _GLIBCXX_USE_DEPRECATED.
2011-01-31 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config (_GLIBCXX_DEPRECATED): To _GLIBCXX_USE_DEPRECATED. (_GLIBCXX_DEPRECATED_ATTR): To _GLIBCXX_DEPRECATED. * doc/xml/manual/using.xml: Same. * include/std/memory: Same. * include/std/streambuf: Same. * include/bits/shared_ptr.h: Same. * include/bits/unique_ptr.h: Same. * include/bits/shared_ptr_base.h: Same. * include/bits/stl_function.h: Same. * include/tr1/shared_ptr.h: Same. * include/backward/auto_ptr.h: Same. * include/backward/binders.h: Same. From-SVN: r169448
This commit is contained in:
parent
60d237aff2
commit
e1bcd685a2
|
@ -1,3 +1,19 @@
|
||||||
|
2011-01-31 Benjamin Kosnik <bkoz@redhat.com>
|
||||||
|
|
||||||
|
* include/bits/c++config (_GLIBCXX_DEPRECATED): To
|
||||||
|
_GLIBCXX_USE_DEPRECATED.
|
||||||
|
(_GLIBCXX_DEPRECATED_ATTR): To _GLIBCXX_DEPRECATED.
|
||||||
|
* doc/xml/manual/using.xml: Same.
|
||||||
|
* include/std/memory: Same.
|
||||||
|
* include/std/streambuf: Same.
|
||||||
|
* include/bits/shared_ptr.h: Same.
|
||||||
|
* include/bits/unique_ptr.h: Same.
|
||||||
|
* include/bits/shared_ptr_base.h: Same.
|
||||||
|
* include/bits/stl_function.h: Same.
|
||||||
|
* include/tr1/shared_ptr.h: Same.
|
||||||
|
* include/backward/auto_ptr.h: Same.
|
||||||
|
* include/backward/binders.h: Same.
|
||||||
|
|
||||||
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
|
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
|
||||||
|
|
||||||
PR libstdc++/36104 part four
|
PR libstdc++/36104 part four
|
||||||
|
|
|
@ -834,7 +834,7 @@ g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry><term><code>_GLIBCXX_DEPRECATED</code></term>
|
<varlistentry><term><code>_GLIBCXX_USE_DEPRECATED</code></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Defined by default. Not configurable. ABI-changing. Turning this off
|
Defined by default. Not configurable. ABI-changing. Turning this off
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// auto_ptr implementation -*- C++ -*-
|
// auto_ptr implementation -*- C++ -*-
|
||||||
|
|
||||||
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// 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
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
@ -51,7 +51,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
||||||
explicit
|
explicit
|
||||||
auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { }
|
auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { }
|
||||||
} _GLIBCXX_DEPRECATED_ATTR;
|
} _GLIBCXX_DEPRECATED;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -278,7 +278,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
template<typename _Tp1>
|
template<typename _Tp1>
|
||||||
operator auto_ptr<_Tp1>() throw()
|
operator auto_ptr<_Tp1>() throw()
|
||||||
{ return auto_ptr<_Tp1>(this->release()); }
|
{ return auto_ptr<_Tp1>(this->release()); }
|
||||||
} _GLIBCXX_DEPRECATED_ATTR;
|
} _GLIBCXX_DEPRECATED;
|
||||||
|
|
||||||
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||||
// 541. shared_ptr template assignment and void
|
// 541. shared_ptr template assignment and void
|
||||||
|
@ -287,7 +287,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef void element_type;
|
typedef void element_type;
|
||||||
} _GLIBCXX_DEPRECATED_ATTR;
|
} _GLIBCXX_DEPRECATED;
|
||||||
|
|
||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Functor implementations -*- C++ -*-
|
// Functor implementations -*- C++ -*-
|
||||||
|
|
||||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
|
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011
|
||||||
// Free Software Foundation, Inc.
|
// Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
@ -119,7 +119,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
typename _Operation::result_type
|
typename _Operation::result_type
|
||||||
operator()(typename _Operation::second_argument_type& __x) const
|
operator()(typename _Operation::second_argument_type& __x) const
|
||||||
{ return op(value, __x); }
|
{ return op(value, __x); }
|
||||||
} _GLIBCXX_DEPRECATED_ATTR;
|
} _GLIBCXX_DEPRECATED;
|
||||||
|
|
||||||
/// One of the @link binders binder functors@endlink.
|
/// One of the @link binders binder functors@endlink.
|
||||||
template<typename _Operation, typename _Tp>
|
template<typename _Operation, typename _Tp>
|
||||||
|
@ -154,7 +154,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
typename _Operation::result_type
|
typename _Operation::result_type
|
||||||
operator()(typename _Operation::first_argument_type& __x) const
|
operator()(typename _Operation::first_argument_type& __x) const
|
||||||
{ return op(__x, value); }
|
{ return op(__x, value); }
|
||||||
} _GLIBCXX_DEPRECATED_ATTR;
|
} _GLIBCXX_DEPRECATED;
|
||||||
|
|
||||||
/// One of the @link binders binder functors@endlink.
|
/// One of the @link binders binder functors@endlink.
|
||||||
template<typename _Operation, typename _Tp>
|
template<typename _Operation, typename _Tp>
|
||||||
|
|
|
@ -74,16 +74,16 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Macros for deprecated attributes.
|
// Macros for deprecated attributes.
|
||||||
|
// _GLIBCXX_USE_DEPRECATED
|
||||||
// _GLIBCXX_DEPRECATED
|
// _GLIBCXX_DEPRECATED
|
||||||
// _GLIBCXX_DEPRECATED_ATTR
|
#ifndef _GLIBCXX_USE_DEPRECATED
|
||||||
#ifndef _GLIBCXX_DEPRECATED
|
# define _GLIBCXX_USE_DEPRECATED 1
|
||||||
# define _GLIBCXX_DEPRECATED 1
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__DEPRECATED) && defined(__GXX_EXPERIMENTAL_CXX0X__)
|
#if defined(__DEPRECATED) && defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||||
# define _GLIBCXX_DEPRECATED_ATTR __attribute__ ((__deprecated__))
|
# define _GLIBCXX_DEPRECATED __attribute__ ((__deprecated__))
|
||||||
#else
|
#else
|
||||||
# define _GLIBCXX_DEPRECATED_ATTR
|
# define _GLIBCXX_DEPRECATED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __cplusplus
|
#if __cplusplus
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// shared_ptr and weak_ptr implementation -*- C++ -*-
|
// shared_ptr and weak_ptr implementation -*- C++ -*-
|
||||||
|
|
||||||
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// 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
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
@ -246,7 +246,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
explicit shared_ptr(const weak_ptr<_Tp1>& __r)
|
explicit shared_ptr(const weak_ptr<_Tp1>& __r)
|
||||||
: __shared_ptr<_Tp>(__r) { }
|
: __shared_ptr<_Tp>(__r) { }
|
||||||
|
|
||||||
#if _GLIBCXX_DEPRECATED
|
#if _GLIBCXX_USE_DEPRECATED
|
||||||
template<typename _Tp1>
|
template<typename _Tp1>
|
||||||
shared_ptr(std::auto_ptr<_Tp1>&& __r)
|
shared_ptr(std::auto_ptr<_Tp1>&& __r)
|
||||||
: __shared_ptr<_Tp>(std::move(__r)) { }
|
: __shared_ptr<_Tp>(std::move(__r)) { }
|
||||||
|
@ -272,7 +272,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if _GLIBCXX_DEPRECATED
|
#if _GLIBCXX_USE_DEPRECATED
|
||||||
template<typename _Tp1>
|
template<typename _Tp1>
|
||||||
shared_ptr&
|
shared_ptr&
|
||||||
operator=(std::auto_ptr<_Tp1>&& __r)
|
operator=(std::auto_ptr<_Tp1>&& __r)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// shared_ptr and weak_ptr implementation details -*- C++ -*-
|
// shared_ptr and weak_ptr implementation details -*- C++ -*-
|
||||||
|
|
||||||
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// 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
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
@ -525,7 +525,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if _GLIBCXX_DEPRECATED
|
#if _GLIBCXX_USE_DEPRECATED
|
||||||
// Special case for auto_ptr<_Tp> to provide the strong guarantee.
|
// Special case for auto_ptr<_Tp> to provide the strong guarantee.
|
||||||
template<typename _Tp>
|
template<typename _Tp>
|
||||||
explicit
|
explicit
|
||||||
|
@ -844,7 +844,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
__enable_shared_from_this_helper(_M_refcount, __tmp, __tmp);
|
__enable_shared_from_this_helper(_M_refcount, __tmp, __tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if _GLIBCXX_DEPRECATED
|
#if _GLIBCXX_USE_DEPRECATED
|
||||||
// Postcondition: use_count() == 1 and __r.get() == 0
|
// Postcondition: use_count() == 1 and __r.get() == 0
|
||||||
template<typename _Tp1>
|
template<typename _Tp1>
|
||||||
__shared_ptr(std::auto_ptr<_Tp1>&& __r)
|
__shared_ptr(std::auto_ptr<_Tp1>&& __r)
|
||||||
|
@ -872,7 +872,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if _GLIBCXX_DEPRECATED
|
#if _GLIBCXX_USE_DEPRECATED
|
||||||
template<typename _Tp1>
|
template<typename _Tp1>
|
||||||
__shared_ptr&
|
__shared_ptr&
|
||||||
operator=(std::auto_ptr<_Tp1>&& __r)
|
operator=(std::auto_ptr<_Tp1>&& __r)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Functor implementations -*- C++ -*-
|
// Functor implementations -*- C++ -*-
|
||||||
|
|
||||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
|
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011
|
||||||
// Free Software Foundation, Inc.
|
// Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
@ -727,7 +727,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED
|
#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_USE_DEPRECATED
|
||||||
# include <backward/binders.h>
|
# include <backward/binders.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// unique_ptr implementation -*- C++ -*-
|
// unique_ptr implementation -*- C++ -*-
|
||||||
|
|
||||||
// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// 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
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
@ -154,7 +154,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
: _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter()))
|
: _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter()))
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
#if _GLIBCXX_DEPRECATED
|
#if _GLIBCXX_USE_DEPRECATED
|
||||||
template<typename _Up, typename = typename
|
template<typename _Up, typename = typename
|
||||||
std::enable_if<std::is_convertible<_Up*, _Tp*>::value
|
std::enable_if<std::is_convertible<_Up*, _Tp*>::value
|
||||||
&& std::is_same<_Dp,
|
&& std::is_same<_Dp,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// <memory> -*- C++ -*-
|
// <memory> -*- C++ -*-
|
||||||
|
|
||||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
||||||
// 2009, 2010
|
// 2009, 2010, 2011
|
||||||
// Free Software Foundation, Inc.
|
// Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
# include <type_traits>
|
# include <type_traits>
|
||||||
# include <functional>
|
# include <functional>
|
||||||
# include <debug/debug.h>
|
# include <debug/debug.h>
|
||||||
# if _GLIBCXX_DEPRECATED
|
# if _GLIBCXX_USE_DEPRECATED
|
||||||
# include <backward/auto_ptr.h>
|
# include <backward/auto_ptr.h>
|
||||||
# endif
|
# endif
|
||||||
# include <bits/unique_ptr.h>
|
# include <bits/unique_ptr.h>
|
||||||
|
|
|
@ -748,7 +748,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
overflow(int_type /* __c */ = traits_type::eof())
|
overflow(int_type /* __c */ = traits_type::eof())
|
||||||
{ return traits_type::eof(); }
|
{ return traits_type::eof(); }
|
||||||
|
|
||||||
#if _GLIBCXX_DEPRECATED
|
#if _GLIBCXX_USE_DEPRECATED
|
||||||
// Annex D.6
|
// Annex D.6
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// <tr1/shared_ptr.h> -*- C++ -*-
|
// <tr1/shared_ptr.h> -*- C++ -*-
|
||||||
|
|
||||||
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// 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
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
@ -591,7 +591,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
_M_ptr = __r._M_ptr;
|
_M_ptr = __r._M_ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED
|
#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_USE_DEPRECATED
|
||||||
// Postcondition: use_count() == 1 and __r.get() == 0
|
// Postcondition: use_count() == 1 and __r.get() == 0
|
||||||
template<typename _Tp1>
|
template<typename _Tp1>
|
||||||
explicit
|
explicit
|
||||||
|
@ -637,7 +637,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED
|
#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_USE_DEPRECATED
|
||||||
template<typename _Tp1>
|
template<typename _Tp1>
|
||||||
__shared_ptr&
|
__shared_ptr&
|
||||||
operator=(std::auto_ptr<_Tp1>& __r)
|
operator=(std::auto_ptr<_Tp1>& __r)
|
||||||
|
@ -1014,7 +1014,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
shared_ptr(const weak_ptr<_Tp1>& __r)
|
shared_ptr(const weak_ptr<_Tp1>& __r)
|
||||||
: __shared_ptr<_Tp>(__r) { }
|
: __shared_ptr<_Tp>(__r) { }
|
||||||
|
|
||||||
#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED
|
#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_USE_DEPRECATED
|
||||||
template<typename _Tp1>
|
template<typename _Tp1>
|
||||||
explicit
|
explicit
|
||||||
shared_ptr(std::auto_ptr<_Tp1>& __r)
|
shared_ptr(std::auto_ptr<_Tp1>& __r)
|
||||||
|
@ -1041,7 +1041,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED
|
#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_USE_DEPRECATED
|
||||||
template<typename _Tp1>
|
template<typename _Tp1>
|
||||||
shared_ptr&
|
shared_ptr&
|
||||||
operator=(std::auto_ptr<_Tp1>& __r)
|
operator=(std::auto_ptr<_Tp1>& __r)
|
||||||
|
|
Loading…
Reference in New Issue