Make this operator bool() explicit to match the standard library.

llvm-svn: 210073
This commit is contained in:
Rafael Espindola 2014-06-03 04:54:15 +00:00
parent d9a25d82c1
commit da74795f5b
1 changed files with 1 additions and 6 deletions

View File

@ -692,12 +692,7 @@ public:
const error_category& category() const {return *_cat_;}
std::string message() const;
typedef void (*unspecified_bool_type)();
static void unspecified_bool_true() {}
operator unspecified_bool_type() const { // true if error
return _val_ == 0 ? nullptr : unspecified_bool_true;
}
LLVM_EXPLICIT operator bool() const { return _val_ != 0; }
};
inline error_condition make_error_condition(errc _e) {