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

Fix build with Cl and C++20 #368

Open
wants to merge 6 commits into
base: devel
Choose a base branch
from

Conversation

jorisv
Copy link
Contributor

@jorisv jorisv commented Jan 23, 2025

Fix #367

Cl compiler doesn't expand __VA_ARGS__ like clang or gcc. It's well documented but hard to catch.

@aescande have introduce the __VEG_PP_ID macro to overcome this issue without activating the /Zc:preprocessor compiler flags.

TODO

  • Find a fix
  • Activate cl CI steps to avoid regression

@jorisv jorisv self-assigned this Jan 23, 2025
@alxbilger
Copy link

Hi @jorisv, thanks a lot for the fix. Just curious, how is this related to C++20?

@jorisv
Copy link
Contributor Author

jorisv commented Jan 24, 2025

Hello @alxbilger,

It's maybe related to some C++20 specific branch in our code base.

Code like this one can maybe trigger this issue:

#ifdef VEG_WITH_CXX20_SUPPORT
#define VEG_CPP20(...) __VA_ARGS__
#else
#define VEG_CPP20(...)
#endif

I will not dig into the root cause since the fix allow to use the __VEG_IMPL_PARAM_EXPAND in the same way with clang/g++/cl.

@alxbilger
Copy link

I see. Thanks for the clarification

@jorisv jorisv force-pushed the topic/fix-cl-build branch from c1a4c79 to 4faceb6 Compare January 24, 2025 13:09
@jorisv jorisv force-pushed the topic/fix-cl-build branch from 16cc180 to a383d12 Compare January 24, 2025 15:28
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.

3 participants