mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-01 17:28:21 +00:00
Remove some low hanging fruit from system_error.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210728 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9387d058a4
commit
e964d1d6dd
@ -94,9 +94,10 @@ private:
|
||||
|
||||
public:
|
||||
template <class E>
|
||||
ErrorOr(E ErrorCode, typename std::enable_if<is_error_code_enum<E>::value ||
|
||||
is_error_condition_enum<E>::value,
|
||||
void *>::type = 0)
|
||||
ErrorOr(E ErrorCode,
|
||||
typename std::enable_if<std::is_error_code_enum<E>::value ||
|
||||
std::is_error_condition_enum<E>::value,
|
||||
void *>::type = 0)
|
||||
: HasError(true) {
|
||||
new (getErrorStorage()) error_code(make_error_code(ErrorCode));
|
||||
}
|
||||
@ -264,10 +265,11 @@ private:
|
||||
bool HasError : 1;
|
||||
};
|
||||
|
||||
template<class T, class E>
|
||||
typename std::enable_if<is_error_code_enum<E>::value ||
|
||||
is_error_condition_enum<E>::value, bool>::type
|
||||
operator ==(ErrorOr<T> &Err, E Code) {
|
||||
template <class T, class E>
|
||||
typename std::enable_if<std::is_error_code_enum<E>::value ||
|
||||
std::is_error_condition_enum<E>::value,
|
||||
bool>::type
|
||||
operator==(ErrorOr<T> &Err, E Code) {
|
||||
return error_code(Err) == Code;
|
||||
}
|
||||
} // end namespace llvm
|
||||
|
@ -18,9 +18,6 @@
|
||||
|
||||
namespace llvm {
|
||||
using std::error_code;
|
||||
using std::is_error_condition_enum;
|
||||
using std::is_error_code_enum;
|
||||
using std::system_category;
|
||||
using std::generic_category;
|
||||
using std::error_category;
|
||||
using std::make_error_code;
|
||||
|
Loading…
Reference in New Issue
Block a user