Skip to content
10 changes: 9 additions & 1 deletion tl_expected/include/tl_expected/expected.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
// <http://creativecommons.org/publicdomain/zero/1.0/>.
///

#warning "tl_expected/expected.hpp is deprecated. Use <tl/expected.hpp> from libexpected-dev, or <rcpputils/tl_expected/expected.hpp> if the system header is not available."
// If the system header is available, redirect to it.
// Otherwise, fall back to the vendored version
#if __has_include(<tl/expected.hpp>)
#include <tl/expected.hpp>
#else
#ifndef TL_EXPECTED_HPP
#define TL_EXPECTED_HPP

Expand Down Expand Up @@ -2480,4 +2486,6 @@ void swap(expected<T, E> &lhs,
}
} // namespace tl

#endif
#endif // TL_EXPECTED_HPP

#endif // !defined(USE_VENDORED_TL_EXPECTED) && __has_include(<tl/expected.hpp>)
2 changes: 2 additions & 0 deletions tl_expected/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

<buildtool_depend>ament_cmake</buildtool_depend>

<build_export_depend>libexpected-dev</build_export_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
Expand Down
Loading