[function] [stlport] typeinfo in stlport 5.1.5

Hello. I'm using stlport-5.1.5 + mingw32 and trying to compile thread library from boost-1.36. The following error appears: --------Compiler output-------- ./boost/function/function_base.hpp:In static member function `static void boost::detail::function::reference_manager<F>::get(const boost::detail::function::function_buffer&, boost::detail::function::function_buffer&, boost::detail::function::functor_manager_operation_type)': ./boost/function/function_base.hpp:224: error: expected initializer before '&' token --------Compiler output-------- The context in function_base.hpp: 224: const BOOST_FUNCTION_STD_NS::type_info& check_type = 225: *static_cast<const BOOST_FUNCTION_STD_NS::type_info*>(out_buffer.const_obj_ptr); BOOST_FUNCTION_STD_NS is defined as empty because of BOOST_NO_EXCEPTION_STD_NAMESPACE in the same file: function_base.hpp on line 41. BOOST_NO_EXCEPTION_STD_NAMESPACE is found in: --------boost/config/stdlib/stlport.hpp-------- // If STLport is using it's own namespace, and the real names are in // the global namespace, then we duplicate STLport's using declarations // (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't // necessarily import all the names we need into namespace std:: // # if (defined(__STL_IMPORT_VENDOR_CSTD) \ || defined(__STL_USE_OWN_NAMESPACE) \ || defined(_STLP_IMPORT_VENDOR_CSTD) \ || defined(_STLP_USE_OWN_NAMESPACE)) \ && (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD)) # define BOOST_NO_STDC_NAMESPACE # define BOOST_NO_EXCEPTION_STD_NAMESPACE # endif ------boost/config/stdlib/stlport.hpp------ (_STLP_USE_OWN_NAMESPACE and vendor flags is defined in this case) Replacing function_base.hpp:41 with: ----- #if defined(BOOST_NO_EXCEPTION_STD_NAMESPACE) && !defined(_STLP_USE_OWN_NAMESPACE) ----- allows compilation of thread library. Is there an appropriate way to tell BOOST or stlport where type_info is? -- Sincerely, Basilevs

Gulevich Vasili Victorovich:
Is there an appropriate way to tell BOOST or stlport where type_info is?
The correct macro to test is BOOST_NO_STD_TYPEINFO: http://www.boost.org/doc/libs/1_36_0/libs/config/doc/html/boost_config/boost... BOOST_NO_STD_TYPEINFO Standard library The <typeinfo> header declares type_info in the global namespace instead of namespace std. I don't know whether it's defined properly on your configuration; can you check?
participants (2)
-
Gulevich Vasili Victorovich
-
Peter Dimov