Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark operator bool as explicit #2267

Merged
merged 3 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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