diff --git a/src/input/Tag.h b/src/input/Tag.h index c9e997f8e9..78dd65676f 100644 --- a/src/input/Tag.h +++ b/src/input/Tag.h @@ -42,11 +42,8 @@ public: /** * Returns false if the tag represents an error value rather than a * legal reader type. - * TODO: make this conversion operator "explicit" (C++11) or use a - * "safe bool" idiom (not necessary if "explicit" is available), - * otherwise this may allow nonsense/undesired comparison operations. */ - operator bool() const { return *this != Tag(); } + explicit operator bool() const { return *this != Tag(); } /** * Assignment operator. diff --git a/src/logging/Tag.h b/src/logging/Tag.h index ae75487664..bcb7af946b 100644 --- a/src/logging/Tag.h +++ b/src/logging/Tag.h @@ -42,11 +42,8 @@ public: /** * Returns false if the tag represents an error value rather than a * legal writer type. - * TODO: make this conversion operator "explicit" (C++11) or use a - * "safe bool" idiom (not necessary if "explicit" is available), - * otherwise this may allow nonsense/undesired comparison operations. */ - operator bool() const { return *this != Tag(); } + explicit operator bool() const { return *this != Tag(); } /** * Assignment operator.