Skip to content

Commit 8856671

Browse files
Fix invalid preprocessor command 'warning' on MSVC
1 parent c80d356 commit 8856671

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

tl_expected/include/tl_expected/expected.hpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,16 @@
1616
#ifndef TL_EXPECTED_HPP
1717
#define TL_EXPECTED_HPP
1818

19-
#warning "tl_expected/expected.hpp is deprecated and will be removed by the ROS 2 Lyrical Luth release. \
20-
Use <tl/expected.hpp> from libexpected-dev, or <rcpputils/tl_expected/expected.hpp> if the system header is not available."
19+
#ifdef _WIN32
20+
#pragma message( \
21+
"tl_expected/expected.hpp is deprecated and will be removed by the ROS 2 Lyrical Luth release. \
22+
Use <tl/expected.hpp> from libexpected-dev, or <rcpputils/tl_expected/expected.hpp> if the system header is not available.") // NOLINT
23+
#else
24+
#warning \
25+
"tl_expected/expected.hpp is deprecated and will be removed by the ROS 2 Lyrical Luth release. \
26+
Use <tl/expected.hpp> from libexpected-dev, or <rcpputils/tl_expected/expected.hpp> if the system header is not available." // NOLINT
27+
#endif
28+
2129

2230
#define TL_EXPECTED_VERSION_MAJOR 1
2331
#define TL_EXPECTED_VERSION_MINOR 2

0 commit comments

Comments
 (0)