Index: boost/proto/debug.hpp =================================================================== --- boost/proto/debug.hpp (revision 65821) +++ boost/proto/debug.hpp (working copy) @@ -19,6 +19,7 @@ #include #include #include +#include namespace boost { namespace proto { @@ -96,7 +97,7 @@ template std::ostream &operator <<(ostream_wrapper sout_wrap, Tag const &) { - return sout_wrap.sout_ << typeid(Tag).name(); + return sout_wrap.sout_ << BOOST_SP_TYPEID(Tag).name(); } } Index: boost/detail/sp_typeinfo.hpp =================================================================== --- boost/detail/sp_typeinfo.hpp (revision 65821) +++ boost/detail/sp_typeinfo.hpp (working copy) @@ -74,7 +74,7 @@ } }; -template sp_typeinfo sp_typeid_< T >::ti_ = sp_typeid_< T >::name(); +template sp_typeinfo sp_typeid_< T >::ti_(sp_typeid_< T >::name()); template struct sp_typeid_< T & >: sp_typeid_< T > { Index: boost/spirit/home/support/detail/hold_any.hpp =================================================================== --- boost/spirit/home/support/detail/hold_any.hpp (revision 65821) +++ boost/spirit/home/support/detail/hold_any.hpp (working copy) @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -44,7 +45,7 @@ struct bad_any_cast : std::bad_cast { - bad_any_cast(std::type_info const& src, std::type_info const& dest) + bad_any_cast(boost::detail::sp_typeinfo const& src, boost::detail::sp_typeinfo const& dest) : from(src.name()), to(dest.name()) {} @@ -59,7 +60,7 @@ // function pointer table struct fxn_ptr_table { - std::type_info const& (*get_type)(); + boost::detail::sp_typeinfo const& (*get_type)(); void (*static_delete)(void**); void (*destruct)(void**); void (*clone)(void* const*, void**); @@ -78,9 +79,9 @@ template struct type { - static std::type_info const& get_type() + static boost::detail::sp_typeinfo const& get_type() { - return typeid(T); + return BOOST_SP_TYPEID(T); } static void static_delete(void** x) { @@ -120,9 +121,9 @@ template struct type { - static std::type_info const& get_type() + static boost::detail::sp_typeinfo const& get_type() { - return typeid(T); + return BOOST_SP_TYPEID(T); } static void static_delete(void** x) { @@ -302,7 +303,7 @@ return *this; } - std::type_info const& type() const + boost::detail::sp_typeinfo const& type() const { return table->get_type(); } @@ -310,8 +311,8 @@ template T const& cast() const { - if (type() != typeid(T)) - throw bad_any_cast(type(), typeid(T)); + if (type() != BOOST_SP_TYPEID(T)) + throw bad_any_cast(type(), BOOST_SP_TYPEID(T)); return spirit::detail::get_table::is_small::value ? *reinterpret_cast(&object) : @@ -370,7 +371,7 @@ template inline T* any_cast (hold_any* operand) { - if (operand && operand->type() == typeid(T)) { + if (operand && operand->type() == BOOST_SP_TYPEID(T)) { return spirit::detail::get_table::is_small::value ? reinterpret_cast(&operand->object) : reinterpret_cast(operand->object); @@ -401,7 +402,7 @@ nonref* result = any_cast(&operand); if(!result) - boost::throw_exception(bad_any_cast(operand.type(), typeid(T))); + boost::throw_exception(bad_any_cast(operand.type(), BOOST_SP_TYPEID(T))); return *result; }