From 668b3fccaef7460036a1a83a9c90df8cbe76c4ab Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 20 Apr 2010 17:48:16 +0000 Subject: [PATCH] Fixes #4115: sometimes VC++ doesn't put typeinfo in namespace std. [SVN r61434] --- include/boost/config/stdlib/dinkumware.hpp | 5 +++++ include/boost/config/suffix.hpp | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/include/boost/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index ab770599..d87f38b1 100644 --- a/include/boost/config/stdlib/dinkumware.hpp +++ b/include/boost/config/stdlib/dinkumware.hpp @@ -86,6 +86,11 @@ # define BOOST_NO_STD_LOCALE #endif +#include +#if !_HAS_EXCEPTIONS +# define BOOST_NO_STD_TYPEINFO +#endif + // C++0x headers implemented in 520 (as shipped by Microsoft) // #if !defined(_CPPLIB_VER) || _CPPLIB_VER < 520 diff --git a/include/boost/config/suffix.hpp b/include/boost/config/suffix.hpp index 9e4d0788..a61a0cb5 100644 --- a/include/boost/config/suffix.hpp +++ b/include/boost/config/suffix.hpp @@ -554,6 +554,12 @@ namespace boost{ #endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS +// When BOOST_NO_STD_TYPEINFO is defined, we can just import +// the global definition into std namespace: +#ifdef BOOST_NO_STD_TYPEINFO +#include +namespace std{ using ::typeinfo; } +#endif // ---------------------------------------------------------------------------//