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.
This commit is contained in:
parent
a8959ecf81
commit
9daa4e60a4
1 changed files with 1 additions and 1 deletions
|
|
@ -842,7 +842,7 @@ namespace spot
|
|||
return ptr_ != nullptr;
|
||||
}
|
||||
|
||||
operator bool() const noexcept
|
||||
explicit operator bool() const noexcept
|
||||
{
|
||||
return ptr_ != nullptr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue