Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not inject typeinfo into std namespace #307

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions include/boost/config/detail/suffix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,12 +528,6 @@ namespace boost {
# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)

// When BOOST_NO_STD_TYPEINFO is defined, we can just import
// the global definition into std namespace:
#if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus)
#include <typeinfo>
namespace std{ using ::type_info; }
#endif

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to manually delete this block of code to get Boost.Config to compile with the IAR compiler, so I hope this PR gets merged soon!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned on the issue tracker, I'm not sure removing these lines is the best solution after all.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was an MSVC-specific workaround as I recall, if I restrict the code to MSVC does that help?

BTW is there really no typeinfo? What else is missing?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really and truly. Granted, this is because I have disabled exceptions and RTTI on this compiler because our target is embedded. So for example I have BOOST_NO_EXCEPTIONS, BOOST_NO_RTTI and BOOST_NO_TYPEID defined in the preprocessor, and that solves most anticipated problems.


// ---------------------------------------------------------------------------//

Expand Down
10 changes: 0 additions & 10 deletions include/boost/config/stdlib/dinkumware.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,6 @@
# define BOOST_NO_STD_LOCALE
#endif

// Fix for VC++ 8.0 on up ( I do not have a previous version to test )
// or clang-cl. If exceptions are off you must manually include the
// <exception> header before including the <typeinfo> header. Admittedly
// trying to use Boost libraries or the standard C++ libraries without
// exception support is not suggested but currently clang-cl ( v 3.4 )
// does not support exceptions and must be compiled with exceptions off.
#if !_HAS_EXCEPTIONS && ((defined(BOOST_MSVC) && BOOST_MSVC >= 1400) || (defined(__clang__) && defined(_MSC_VER)))
#include <exception>
#endif
#include <typeinfo>
#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (defined(__ghs__) && !_HAS_NAMESPACE) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__) \
&& !defined(__VXWORKS__)
# define BOOST_NO_STD_TYPEINFO
Expand Down