You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mozilla has a static analysis for C++ code by own's clang-plugin. ExplicitImplicitChecker is a checker for implicit type conversion in constructor.
The constructors of diplomat::Ok, diplomat::Err, diplomat::result and diplomat::span has no explicit keyword. So it means that it can cause implicit type conversion in constructor.
So I would like to request to add explicit keyword for some class's constructors.
I'm not opposed to some of these. Ok/Err should be explicit. result and span ... prbably not; it's an intentional choice there. result is supposed to be implicitly constructable from Ok/Err and span is supposed to also be implicitly constructible just like std::span is. The Google style guide you link to talks about interchangeablility as an example.
It would be nice if we could have a CI job that matched the settings Mozilla uses to build so we don't discover these things during integration.
Mozilla has a static analysis for C++ code by own's clang-plugin. ExplicitImplicitChecker is a checker for implicit type conversion in constructor.
The constructors of
diplomat::Ok
,diplomat::Err
,diplomat::result
anddiplomat::span
has no explicit keyword. So it means that it can cause implicit type conversion in constructor.So I would like to request to add explicit keyword for some class's constructors.
I guess that https://google.github.io/styleguide/cppguide.html#Explicit_Constructors will be same things.
The text was updated successfully, but these errors were encountered: