Commit 9daa4e60 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

formula: make operator bool explicit

* spot/tl/formula.hh (formula::operator bool): Make it explicit.  When
compiling in C++20 mode with g++ 10.1, this bool operator was used
instead of the comparison operators while looking up a
std::pair<formula,formula> in a hash map, causing many test suite
failures.  This problem does not occur with clang++ 10.0, so it
might just be a bug in g++ 10.1.  But having explicit operator bool
is good practice anyway.
parent a8959ecf
Pipeline #20495 passed with stages
in 204 minutes and 25 seconds
......@@ -842,7 +842,7 @@ namespace spot
return ptr_ != nullptr;
operator bool() const noexcept
explicit operator bool() const noexcept
return ptr_ != nullptr;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment