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
11 changes: 10 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,13 @@
// <http://creativecommons.org/publicdomain/zero/1.0/>.
///

// If the system header is available, redirect to it.
// Otherwise, fall back to the vendored version with a deprecation warning.
#if __has_include(<tl/expected.hpp>)
#include <tl/expected.hpp>
#else
#warning "tl_expected/expected.hpp is deprecated. Please install libexpected-dev and use <tl/expected.hpp> instead."

#ifndef TL_EXPECTED_HPP
#define TL_EXPECTED_HPP

Expand Down Expand Up @@ -2480,4 +2487,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 @@ -14,6 +14,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