tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

TestExplicitOperatorBool.cpp (332B)


      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 };