Skip to content

Commit 027fc03

Browse files
FIx invalid preprocessor command 'warning' on MSVC
1 parent a85026b commit 027fc03

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

tl_expected/include/tl_expected/expected.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@
1313
// <http://creativecommons.org/publicdomain/zero/1.0/>.
1414
///
1515

16-
#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."
16+
#ifdef _WIN32
17+
#pragma message( \
18+
"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.") // NOLINT
19+
#else
20+
#warning \
21+
"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." // NOLINT
22+
#endif
1723
// If the system header is available, redirect to it.
1824
// Otherwise, fall back to the vendored version
1925
#if __has_include(<tl/expected.hpp>)

0 commit comments

Comments
 (0)