From c80d356ddb9b441f82dce30e7edacb64473564e8 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Fri, 13 Mar 2026 07:51:16 +0000 Subject: [PATCH 1/2] Add a deprecation warning to tl_expected --- tl_expected/include/tl_expected/expected.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tl_expected/include/tl_expected/expected.hpp b/tl_expected/include/tl_expected/expected.hpp index ae90975..9a2c653 100644 --- a/tl_expected/include/tl_expected/expected.hpp +++ b/tl_expected/include/tl_expected/expected.hpp @@ -16,6 +16,9 @@ #ifndef TL_EXPECTED_HPP #define TL_EXPECTED_HPP +#warning "tl_expected/expected.hpp is deprecated and will be removed by the ROS 2 Lyrical Luth release. \ + Use from libexpected-dev, or if the system header is not available." + #define TL_EXPECTED_VERSION_MAJOR 1 #define TL_EXPECTED_VERSION_MINOR 2 #define TL_EXPECTED_VERSION_PATCH 0 From 8856671d42150340e81c0b2566b5b66592032382 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Sun, 22 Mar 2026 21:11:49 +0000 Subject: [PATCH 2/2] Fix invalid preprocessor command 'warning' on MSVC --- tl_expected/include/tl_expected/expected.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tl_expected/include/tl_expected/expected.hpp b/tl_expected/include/tl_expected/expected.hpp index 9a2c653..e7a5411 100644 --- a/tl_expected/include/tl_expected/expected.hpp +++ b/tl_expected/include/tl_expected/expected.hpp @@ -16,8 +16,16 @@ #ifndef TL_EXPECTED_HPP #define TL_EXPECTED_HPP -#warning "tl_expected/expected.hpp is deprecated and will be removed by the ROS 2 Lyrical Luth release. \ - Use from libexpected-dev, or if the system header is not available." +#ifdef _WIN32 +#pragma message( \ + "tl_expected/expected.hpp is deprecated and will be removed by the ROS 2 Lyrical Luth release. \ + Use from libexpected-dev, or if the system header is not available.") // NOLINT +#else +#warning \ + "tl_expected/expected.hpp is deprecated and will be removed by the ROS 2 Lyrical Luth release. \ + Use from libexpected-dev, or if the system header is not available." // NOLINT +#endif + #define TL_EXPECTED_VERSION_MAJOR 1 #define TL_EXPECTED_VERSION_MINOR 2