]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libstdc++/38596 (tr1_impl/functional incompatible with -fno-rtti)
authorPaolo Carlini <paolo.carlini@oracle.com>
Sun, 21 Dec 2008 15:56:22 +0000 (15:56 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 21 Dec 2008 15:56:22 +0000 (15:56 +0000)
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

libstdc++-v3/ChangeLog
libstdc++-v3/include/tr1_impl/functional

index da8f90b36c132dcf65b8589bfe8377e13f505a97..b0ebadca88bc6b405de0e9a2362321d5b200f08c 100644 (file)
@@ -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.
index 4e4864fa62d694cd4defb3f1124cdf0dd2995d9e..f3d843c9d8cd9686d70480d745d2acd9b3917e1b 100644 (file)
@@ -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