From 7d5fe32ebf8cc06c6963c7526c0c3c8001e1a6c5 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 3 Jun 2014 04:54:15 +0000 Subject: Make this operator bool() explicit to match the standard library. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210073 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/system_error.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'include/llvm/Support') diff --git a/include/llvm/Support/system_error.h b/include/llvm/Support/system_error.h index 8b3d9cc0c7..104cbc42e5 100644 --- a/include/llvm/Support/system_error.h +++ b/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) { -- cgit v1.2.3