osrf / osrf_testing_tools_cpp

Common testing tools for C++ which are used for testing in various OSRF projects.
Apache License 2.0
33 stars 29 forks source link

Fix mpark/variant conditional for MSVC #77

Closed cottsay closed 1 year ago

cottsay commented 1 year ago

This conditional currently evaluates to TRUE when _MSC_VER is not defined, meaning that __SHOULD_USE_MPARK_VARIANT is 1 for ALL SYSTEMS except newer MSVC, which is certainly not correct.

From what I can tell, this bug has been present since 1.0.0. It only came to my attention when I started to see linking errors between libraries which use STL variant and ones which link against this package. I'm absolutely floored that this hasn't become a problem sooner.

cottsay commented 1 year ago