Debian Codegraph @

build/clang-plugin/tests/TestExplicitOperatorBool.cpp

raw
1 #define MOZ_IMPLICIT __attribute__((annotate("moz_implicit")))
2
3 struct Bad {
4 operator bool(); // expected-error {{bad implicit conversion operator for 'Bad'}} expected-note {{consider adding the explicit keyword to 'operator bool'}}
5 };
6 struct Good {
7 explicit operator bool();
8 };
9 struct Okay {
10 MOZ_IMPLICIT operator bool();
11 };