[llvm] r210728 - Remove some low hanging fruit from system_error.h
Rafael Espindola
rafael.espindola at gmail.com
Wed Jun 11 18:10:47 PDT 2014
Author: rafael
Date: Wed Jun 11 20:10:47 2014
New Revision: 210728
URL: http://llvm.org/viewvc/llvm-project?rev=210728&view=rev
Log:
Remove some low hanging fruit from system_error.h
Modified:
llvm/trunk/include/llvm/Support/ErrorOr.h
llvm/trunk/include/llvm/Support/system_error.h
Modified: llvm/trunk/include/llvm/Support/ErrorOr.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ErrorOr.h?rev=210728&r1=210727&r2=210728&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/ErrorOr.h (original)
+++ llvm/trunk/include/llvm/Support/ErrorOr.h Wed Jun 11 20:10:47 2014
@@ -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
Modified: llvm/trunk/include/llvm/Support/system_error.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/system_error.h?rev=210728&r1=210727&r2=210728&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/system_error.h (original)
+++ llvm/trunk/include/llvm/Support/system_error.h Wed Jun 11 20:10:47 2014
@@ -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;
More information about the llvm-commits
mailing list