mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 19:42:54 +02:00
Make this operator bool() explicit to match the standard library.
llvm-svn: 210073
This commit is contained in:
parent
26d387b4fc
commit
063807ad90
@ -692,12 +692,7 @@ public:
|
|||||||
const error_category& category() const {return *_cat_;}
|
const error_category& category() const {return *_cat_;}
|
||||||
std::string message() const;
|
std::string message() const;
|
||||||
|
|
||||||
typedef void (*unspecified_bool_type)();
|
LLVM_EXPLICIT operator bool() const { return _val_ != 0; }
|
||||||
static void unspecified_bool_true() {}
|
|
||||||
|
|
||||||
operator unspecified_bool_type() const { // true if error
|
|
||||||
return _val_ == 0 ? nullptr : unspecified_bool_true;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inline error_condition make_error_condition(errc _e) {
|
inline error_condition make_error_condition(errc _e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user