Closed felixf4xu closed 1 year ago
@felixf4xu Thanks for reporting this issue!
Before we start having a closer look one question: Which branches/tags did you use from rmw_iceoryx
and iceoryx
? humble
and v2.0.3
, right?
So, my question is: does it make sense to set c++ 17 in windows build just like in iceoryx?
I think that makes a lot of sense. We should use the same C++ standard for both rmw_iceoryx
and iceoryx
. Did you check if it builds correctly with MSVC if you set CMAKE_CXX_STANDARD
to 17
in rmw_iceoryx
?
During my test, rmw_iceoryx
is at branch humble
; iceoryx
is at tag of v2.0.3
(default tag in ros2 humble).
If I set CMAKE_CXX_STANDARD
to 17
, this issue is fixed. (there is some other issue, though, I am still investigating into it)
If I set CMAKE_CXX_STANDARD to 17, this issue is fixed.
Great, I will create a PR for that.
Hi,
I'm trying to build
rmw_iceoryx
on Win11 with Visual studio 2022 and I had a compiling error.the code is actually from
iceoryx
itself but it's included inrmw_init.cpp
. The source codetype_traits.hpp(63,28)
is:In my case, my
__cplusplus
is greater than201703L
and sostd::invoke_result
is used.But
std::invoke_result
is a feature in c++ 17.The current project is c++ 14 as in cmake https://github.com/ros2/rmw_iceoryx/blob/humble/rmw_iceoryx_cpp/CMakeLists.txt#LL9C1-L12C8:
the code above is flexible and I can set
CMAKE_CXX_STANDARD
.Then I checked the source code of
iceoryx
itself,the older version (v2.0.3 as in ros2 humble) of code is :
and the latest code is moved to https://github.com/eclipse-iceoryx/iceoryx/blob/master/iceoryx_platform/win/IceoryxPlatformSettings.cmake#L18 and is:
So, my question is: does it make sense to set c++ 17 in windows build just like in
iceoryx
?