From 1462428dc7206d57342e1199bae2a3b47b3b7179 Mon Sep 17 00:00:00 2001 From: Rustam Gamidov Date: Wed, 6 Dec 2023 09:17:44 +0200 Subject: [PATCH] Avoid `boost::optional::has_value()` in tests. Use casting to `bool` instead. There is `has_value()` in the boost 1.69 listed as a dependency. On the other hand there are CI nodes with boost 1.65 without it. So there are no reasons to decrease compatibility. Relates-To: OLPEDGE-2845 Signed-off-by: Rustam Gamidov --- tests/common/matchers/NetworkUrlMatchers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/common/matchers/NetworkUrlMatchers.h b/tests/common/matchers/NetworkUrlMatchers.h index 4875a296a..fca858524 100644 --- a/tests/common/matchers/NetworkUrlMatchers.h +++ b/tests/common/matchers/NetworkUrlMatchers.h @@ -100,7 +100,7 @@ MATCHER_P(HeadersContain, expected_header, "") { } MATCHER_P(HeadersContainOptional, expected_optional, "") { - if (!expected_optional.has_value()) { + if (!expected_optional) { return true; } const auto& expected_header = expected_optional.value();