Skip to content

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
@jorisv jorisv merged commit d9b4dea into Simple-Robotics:devel Jan 27, 2025
135 of 164 checks passed
@jorisv jorisv deleted the topic/fix-cl-build branch January 27, 2025 10:36
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