[Boost-bugs] [Boost C++ Libraries] #10749: Compilation failure in shared_ptr_helper.hpp

Subject: [Boost-bugs] [Boost C++ Libraries] #10749: Compilation failure in shared_ptr_helper.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-11-04 21:33:07


#10749: Compilation failure in shared_ptr_helper.hpp
------------------------------+---------------------------
 Reporter: box_01@… | Owner: ramey
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: serialization
  Version: Boost 1.57.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------
 With 1.57, I noted a compile error:


 {{{
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp: In static
 member function ‘static const boost::serialization::extended_type_info*
 boost::serialization::shared_ptr_helper<SPT>::non_polymorphic::get_object_type(U&)’:
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp:108:39: error:
 â€˜type_info_implementation’ in namespace ‘boost::serialization’ does not
 name a type
                  boost::serialization::type_info_implementation< U >::type
                                        ^
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp:108:63: error:
 expected template-argument before ‘<’ token
                  boost::serialization::type_info_implementation< U >::type
                                                                ^
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp:108:63: error:
 expected ‘>’ before ‘<’ token
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp:109:13: error:
 template argument 1 is invalid
>::get_const_instance();
              ^
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp:109:16: error:
 expected ‘(’ before ‘get_const_instance’
>::get_const_instance();
                 ^
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp:109:16: error:
 expected ‘;’ before ‘get_const_instance’
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp:109:35: error:
 there are no arguments to ‘get_const_instance’ that depend on a template
 parameter, so a declaration of ‘get_const_instance’ must be available
 [-fpermissive]
>::get_const_instance();
                                    ^
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp:109:35: note:
 (if you use ‘-fpermissive’, G++ will accept your code, but allowing the
 use of an undeclared name is deprecated)
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp: In static
 member function ‘static const boost::serialization::extended_type_info*
 boost::serialization::shared_ptr_helper<SPT>::polymorphic::get_object_type(U&)’:
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp:118:39: error:
 â€˜type_info_implementation’ in namespace ‘boost::serialization’ does not
 name a type
                  boost::serialization::type_info_implementation< U >::type
                                        ^
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp:118:63: error:
 expected template-argument before ‘<’ token
                  boost::serialization::type_info_implementation< U >::type
                                                                ^
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp:118:63: error:
 expected ‘>’ before ‘<’ token
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp:119:13: error:
 template argument 1 is invalid
>::get_const_instance().get_derived_extended_type_info(u);
              ^
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp:119:16: error:
 expected ‘(’ before ‘get_const_instance’
>::get_const_instance().get_derived_extended_type_info(u);
                 ^
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp:119:16: error:
 expected ‘;’ before ‘get_const_instance’
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp:119:35: error:
 there are no arguments to ‘get_const_instance’ that depend on a template
 parameter, so a declaration of ‘get_const_instance’ must be available
 [-fpermissive]
>::get_const_instance().get_derived_extended_type_info(u);
                                    ^
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp: In member
 function ‘void
 boost::serialization::shared_ptr_helper<SPT>::reset(SPT<T>&, T*)’:
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp:131:17: error:
 â€˜type_info_implementation’ is not a member of ‘boost::serialization’
              = & boost::serialization::type_info_implementation< T >::type
                  ^
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp:131:67: error:
 expected primary-expression before ‘>’ token
              = & boost::serialization::type_info_implementation< T >::type
                                                                    ^
 v_1_57_0/include/boost/serialization/shared_ptr_helper.hpp:131:70: error:
 â€˜::type’ has not been declared
              = & boost::serialization::type_info_implementation< T >::type
 }}}

 The fix is to include header
 {{{
 #include <boost/serialization/type_info_implementation.hpp>
 }}}
 in shared_ptr_helper.hpp.

 This issue is somewhat to https://svn.boost.org/trac/boost/ticket/10348.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10749>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC