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

Conversation

Kojoley
Copy link
Contributor

@Kojoley Kojoley commented Dec 2, 2019

BOOST_NO_STD_TYPEINFO should be used to detect if there is no typeinfo in std namespace, or Boost.Core/Boost.TypeInfo wrappers for a portable solution.

Closes #306.

`BOOST_NO_STD_TYPEINFO` should be used to detect if there is no `typeinfo` in
`std` namespace, or Boost.Core/Boost.TypeInfo wrappers for a portable solution.
#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.

@jeremy-murphy
Copy link

@Kojoley I think you need to resolve the merge conflicts for this to ever have a hope of being merged.

@Kojoley
Copy link
Contributor Author

Kojoley commented Jul 24, 2020

The change it conflicts with (035c096) is just wrong and should be reverted, then this will land cleanly.

@jzmaddock
Copy link
Collaborator

The problem I have is that this PR breaks the original purpose of those workarounds.

Try this: 46e0a13

@Kojoley
Copy link
Contributor Author

Kojoley commented Jul 25, 2020

What is the original purpose of those workarounds? To slow compilation for everyone because of Boost.LexicalCast? I fixed Boost.LexicalCast and it is not need the workaround in Boost.Config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<typeinfo> unconditionally included on dinkumware
3 participants