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

BOOST_WORKAROUND(__clang_major__, ...) generates an undefined preprocessor symbol #107

Open
nivekkagicom opened this issue Feb 6, 2019 · 4 comments

Comments

@nivekkagicom
Copy link

This code in config.hpp:

#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !BOOST_WORKAROUND(BOOST_GCC, < 40900)\
      && !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && !BOOST_WORKAROUND(__clang_major__, <= 4)
#  define BOOST_TT_HAS_ASCCURATE_IS_FUNCTION
#endif

Can generate a warning or error as __clang_major___WORKAROUND_GUARD is not defined.

@Hakuhonoo
Copy link

Its actually, doing this for me

@chuchusoft
Copy link

I also get this problem (using /Wall with clang-cl on Visual Studio 2019 16.6.4)

Also, the #define symbol is incorrectly spelled: BOOST_TT_HAS_ASCCURATE_IS_FUNCTION should probably be BOOST_TT_HAS_ACCURATE_IS_FUNCTION

@pdimov
Copy link
Member

pdimov commented Jul 4, 2021

This has also been reported in boostorg/config#322.

An additional problem with this check is that __clang_major__ can be more than 4 on macOS, but Clang can still effectively be 3.x according to the official versioning, as Apple use their own versioning scheme.

@pdimov
Copy link
Member

pdimov commented Jul 4, 2021

This is resolved by boostorg/config#383, although if boostorg/config#385 is merged it will be better to switch the check to use the new macro.

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

No branches or pull requests

4 participants