Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
#include <fmt/format.h>
#include <fmt/ranges.h>

// silence deprecation warnings for parameter_traits, needed for backwards compatibility
#define SILENCE_DEPRECATION_WARNINGS
#include <parameter_traits/parameter_traits.hpp>
#undef SILENCE_DEPRECATION_WARNINGS

#include <rsl/static_string.hpp>
#include <rsl/static_vector.hpp>
Expand Down
13 changes: 13 additions & 0 deletions parameter_traits/include/parameter_traits/parameter_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@
#include <rsl/algorithm.hpp>
#include <tl_expected/expected.hpp>

#ifndef SILENCE_DEPRECATION_WARNINGS
#ifdef _MSC_VER
#pragma message( \
"This header is obsolete, \
please include \"rsl/algorithm.hpp\" for rsl::contains and rsl::is_unique, \
and \"tl_expected/expected.hpp\" for tl::expected.")
#else
#warning This header is obsolete, \
please include "rsl/algorithm.hpp" for rsl::contains and rsl::is_unique, \
and "tl_expected/expected.hpp" for tl::expected.
#endif
#endif

namespace parameter_traits {

using Result
Expand Down
6 changes: 6 additions & 0 deletions parameter_traits/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@

<export>
<build_type>ament_cmake</build_type>
<export>
<deprecated>
This package will be removed in Lyrical Luth. Instead, use the
rsl or tl_expected packages directly for similar functionality.
</deprecated>
</export>
</export>
</package>
Loading