diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-03 04:54:15 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-03 04:54:15 +0000 |
commit | da74795f5b877dd83d12b19fdb90171baddccb68 (patch) | |
tree | 0b01d59c95b00b2c7e05f64038711d838353e108 /llvm/include | |
parent | d9a25d82c1369b0310b3d58905eb3024f8da367e (diff) | |
download | bcm5719-llvm-da74795f5b877dd83d12b19fdb90171baddccb68.tar.gz bcm5719-llvm-da74795f5b877dd83d12b19fdb90171baddccb68.zip |
Make this operator bool() explicit to match the standard library.
llvm-svn: 210073
Diffstat (limited to 'llvm/include')
-rw-r--r-- | llvm/include/llvm/Support/system_error.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/include/llvm/Support/system_error.h b/llvm/include/llvm/Support/system_error.h index 8b3d9cc0c70..104cbc42e56 100644 --- a/llvm/include/llvm/Support/system_error.h +++ b/llvm/include/llvm/Support/system_error.h @@ -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) { |