A conversion operator is not explicit, so objects convert to its type wherever a conversion fits

tx0/cpp:implicit-conversion-operatorstrictwarningmaintainability/designdepth fastsmell

What it finds

operator bool() without explicit lets an object take part in arithmetic and comparisons as an integer; other conversion operators convert silently in calls and initializations. explicit operator T() still works in conditions and casts.

From the rule's source, implicit_conversion_operator.rs.

Turn it on, off or suppress it

The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/cpp:implicit-conversion-operator" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/cpp:implicit-conversion-operator] reason="..."

tx0 explain tx0/cpp:implicit-conversion-operator shows the same in the terminal. Found a false positive? Report it.