Skip to content

Commit

Permalink
Merge pull request #2267 from jwillemsen/jwi-explicitop
Browse files Browse the repository at this point in the history
Mark operator bool as explicit
  • Loading branch information
jwillemsen authored Jul 31, 2024
2 parents 489a3a7 + 32c3400 commit 6cff7aa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ACE/protocols/ace/INet/HTTPS_Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace ACE

~Context ();

operator bool () const;
explicit operator bool () const;

bool operator ! () const;

Expand Down
2 changes: 1 addition & 1 deletion ACE/protocols/ace/INet/HTTP_Status.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ namespace ACE
bool is_ok () const;

/// Return true in case of a *valid* HTTP status
operator bool () const;
explicit operator bool () const;

/// Return true if status code == INVALID
bool operator !() const;
Expand Down
2 changes: 1 addition & 1 deletion ACE/protocols/ace/INet/URLBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace ACE

bool operator ! ();

operator bool ();
explicit operator bool ();

std::istream& operator * ();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Dynamic_Bitset
typedef unsigned size_type;
reference(Dynamic_Bitset* bitset, size_type bit);
reference operator = (bool val);
operator bool () const;
explicit operator bool () const;
private:
Dynamic_Bitset* bitset_;
size_type bit_;
Expand Down

0 comments on commit 6cff7aa

Please sign in to comment.