diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-12 01:10:47 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-12 01:10:47 +0000 |
commit | e964d1d6dda61f1f8f9f4690842977ceeb428cef (patch) | |
tree | 07d3fda43a2a4a17f1d505bacfa9df4c7b784051 /include | |
parent | 9387d058a48752174f2feb82fcfcf0898345ea1d (diff) | |
download | llvm-e964d1d6dda61f1f8f9f4690842977ceeb428cef.tar.gz llvm-e964d1d6dda61f1f8f9f4690842977ceeb428cef.tar.bz2 llvm-e964d1d6dda61f1f8f9f4690842977ceeb428cef.tar.xz |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/ErrorOr.h | 16 | ||||
-rw-r--r-- | include/llvm/Support/system_error.h | 3 |
2 files changed, 9 insertions, 10 deletions
diff --git a/include/llvm/Support/ErrorOr.h b/include/llvm/Support/ErrorOr.h index 625574b88b..e877b6ab9d 100644 --- a/include/llvm/Support/ErrorOr.h +++ b/include/llvm/Support/ErrorOr.h @@ -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 diff --git a/include/llvm/Support/system_error.h b/include/llvm/Support/system_error.h index 9aa00d8745..ad2c99c25c 100644 --- a/include/llvm/Support/system_error.h +++ b/include/llvm/Support/system_error.h @@ -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; |