Module: check_mk
Branch: master
Commit: 63ed249feb481a20132407e23fd51d82417a7646
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=63ed249feb481a…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Nov 8 10:57:49 2018 +0100
Added a workaround for a g++/libstdc++ bug.
Change-Id: I1d0aa7e5f104aa35bf353f19155b4fd44f221b08
---
livestatus/src/IntFilter.cc | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/livestatus/src/IntFilter.cc b/livestatus/src/IntFilter.cc
index aaf8358..fce79a4 100644
--- a/livestatus/src/IntFilter.cc
+++ b/livestatus/src/IntFilter.cc
@@ -92,9 +92,12 @@ std::optional<int32_t> IntFilter::greatestLowerBoundFor(
case RelationalOperator::doesnt_match_icase: // contains none of
case RelationalOperator::less:
case RelationalOperator::less_or_equal:
- return {};
+ // NOTE: If we use the equivalent 'return {}' here and the other
+ // std::nullopt occurences below, we run into g++/libstdc++ bug
+ //
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86465. :-/
+ return std::nullopt;
}
- return {}; // unreachable
+ return std::nullopt; // unreachable
}
std::optional<int32_t> IntFilter::leastUpperBoundFor(
@@ -118,9 +121,9 @@ std::optional<int32_t> IntFilter::leastUpperBoundFor(
case RelationalOperator::doesnt_match_icase: // contains none of
case RelationalOperator::greater_or_equal:
case RelationalOperator::greater:
- return {};
+ return std::nullopt;
}
- return {}; // unreachable
+ return std::nullopt; // unreachable
}
std::optional<std::bitset<32>> IntFilter::valueSetLeastUpperBoundFor(