diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2008-12-21 15:56:22 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2008-12-21 15:56:22 +0000 |
commit | c947d638c601375ce799ef4d87f9aa6d5b8972a8 (patch) | |
tree | 803821babb9d1a61932326659c49f4defabde15f /libstdc++-v3 | |
parent | 924eabec0b90e5499271806c28af40814d77496b (diff) | |
download | gcc-c947d638c601375ce799ef4d87f9aa6d5b8972a8.zip gcc-c947d638c601375ce799ef4d87f9aa6d5b8972a8.tar.gz gcc-c947d638c601375ce799ef4d87f9aa6d5b8972a8.tar.bz2 |
re PR libstdc++/38596 (tr1_impl/functional incompatible with -fno-rtti)
2008-12-21 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/38596
* include/tr1_impl/function (function<>::target,
function<>::target_type): Provide only when __GXX_RTTI is defined.
(_Function_base::_M_manager, _Ref_manager<>::_M_manager,
_Function_handler<void(_ArgTypes...), _Member _Class::*>::_M_manager):
Adjust.
From-SVN: r142862
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 9 | ||||
-rw-r--r-- | libstdc++-v3/include/tr1_impl/functional | 17 |
2 files changed, 21 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index da8f90b..b0ebadc 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2008-12-21 Paolo Carlini <paolo.carlini@oracle.com> + + PR libstdc++/38596 + * include/tr1_impl/function (function<>::target, + function<>::target_type): Provide only when __GXX_RTTI is defined. + (_Function_base::_M_manager, _Ref_manager<>::_M_manager, + _Function_handler<void(_ArgTypes...), _Member _Class::*>::_M_manager): + Adjust. + 2008-12-19 Ben Elliston <bje@au.ibm.com> * acinclude.m4: Guard a variable test against an empty string. diff --git a/libstdc++-v3/include/tr1_impl/functional b/libstdc++-v3/include/tr1_impl/functional index 4e4864fa..f3d843c 100644 --- a/libstdc++-v3/include/tr1_impl/functional +++ b/libstdc++-v3/include/tr1_impl/functional @@ -1531,10 +1531,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 { switch (__op) { +#ifdef __GXX_RTTI case __get_type_info: __dest._M_access<const type_info*>() = &typeid(_Functor); break; - +#endif case __get_functor_ptr: __dest._M_access<_Functor*>() = _M_get_pointer(__source); break; @@ -1596,10 +1597,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 { switch (__op) { +#ifdef __GXX_RTTI case __get_type_info: __dest._M_access<const type_info*>() = &typeid(_Functor); break; - +#endif case __get_functor_ptr: __dest._M_access<_Functor*>() = *_Base::_M_get_pointer(__source); return is_const<_Functor>::value; @@ -1730,10 +1732,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 { switch (__op) { +#ifdef __GXX_RTTI case __get_type_info: __dest._M_access<const type_info*>() = &typeid(_Functor); break; - +#endif case __get_functor_ptr: __dest._M_access<_Functor*>() = &_Base::_M_get_pointer(__source)->__value; @@ -1935,7 +1938,8 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 * stored by @c this. */ _Res operator()(_ArgTypes... __args) const; - + +#ifdef __GXX_RTTI // [3.7.2.5] function target access /** * @brief Determine the type of the target of this function object @@ -1961,7 +1965,8 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 /// @overload template<typename _Functor> const _Functor* target() const; - +#endif + private: // [3.7.2.6] undefined operators template<typename _Function> @@ -2020,6 +2025,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 return _M_invoker(_M_functor, __args...); } +#ifdef __GXX_RTTI template<typename _Res, typename... _ArgTypes> const type_info& function<_Res(_ArgTypes...)>:: @@ -2069,6 +2075,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 else return 0; } +#endif // [3.7.2.7] null pointer comparisons |