aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/system_error.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/system_error.h')
-rw-r--r--include/llvm/Support/system_error.h52
1 files changed, 24 insertions, 28 deletions
diff --git a/include/llvm/Support/system_error.h b/include/llvm/Support/system_error.h
index 43dace6..4ca4b06 100644
--- a/include/llvm/Support/system_error.h
+++ b/include/llvm/Support/system_error.h
@@ -48,10 +48,10 @@ const error_category& generic_category();
const error_category& system_category();
template <class T> struct is_error_code_enum
- : public false_type {};
+ : public std::false_type {};
template <class T> struct is_error_condition_enum
- : public false_type {};
+ : public std::false_type {};
class error_code
{
@@ -203,7 +203,7 @@ enum class errc
wrong_protocol_type // EPROTOTYPE
};
-template <> struct is_error_condition_enum<errc> : true_type { }
+template <> struct is_error_condition_enum<errc> : std::true_type { }
error_code make_error_code(errc e);
error_condition make_error_condition(errc e);
@@ -225,7 +225,6 @@ template <> struct hash<std::error_code>;
*/
#include "llvm/Config/llvm-config.h"
-#include "llvm/Support/type_traits.h"
#include <cerrno>
#include <string>
@@ -474,11 +473,11 @@ namespace llvm {
// is_error_code_enum
-template <class Tp> struct is_error_code_enum : public false_type {};
+template <class Tp> struct is_error_code_enum : public std::false_type {};
// is_error_condition_enum
-template <class Tp> struct is_error_condition_enum : public false_type {};
+template <class Tp> struct is_error_condition_enum : public std::false_type {};
// Some error codes are not present on all platforms, so we provide equivalents
// for them:
@@ -613,9 +612,9 @@ enum _ {
operator int() const {return v_;}
};
-template <> struct is_error_condition_enum<errc> : true_type { };
+template <> struct is_error_condition_enum<errc> : std::true_type { };
-template <> struct is_error_condition_enum<errc::_> : true_type { };
+template <> struct is_error_condition_enum<errc::_> : std::true_type { };
class error_condition;
class error_code;
@@ -629,8 +628,8 @@ class error_category
public:
virtual ~error_category();
-private:
error_category();
+private:
error_category(const error_category&) LLVM_DELETED_FUNCTION;
error_category& operator=(const error_category&) LLVM_DELETED_FUNCTION;
@@ -653,7 +652,7 @@ public:
class _do_message : public error_category
{
public:
- virtual std::string message(int ev) const LLVM_OVERRIDE;
+ std::string message(int ev) const override;
};
const error_category& generic_category();
@@ -675,7 +674,7 @@ public:
: _val_(_val), _cat_(&_cat) {}
template <class E>
- error_condition(E _e, typename enable_if_c<
+ error_condition(E _e, typename std::enable_if<
is_error_condition_enum<E>::value
>::type* = 0)
{*this = make_error_condition(_e);}
@@ -686,13 +685,12 @@ public:
}
template <class E>
- typename enable_if_c
- <
- is_error_condition_enum<E>::value,
- error_condition&
- >::type
- operator=(E _e)
- {*this = make_error_condition(_e); return *this;}
+ typename std::enable_if<is_error_condition_enum<E>::value,
+ error_condition &>::type
+ operator=(E _e) {
+ *this = make_error_condition(_e);
+ return *this;
+ }
void clear() {
_val_ = 0;
@@ -737,7 +735,7 @@ public:
: _val_(_val), _cat_(&_cat) {}
template <class E>
- error_code(E _e, typename enable_if_c<
+ error_code(E _e, typename std::enable_if<
is_error_code_enum<E>::value
>::type* = 0) {
*this = make_error_code(_e);
@@ -749,13 +747,11 @@ public:
}
template <class E>
- typename enable_if_c
- <
- is_error_code_enum<E>::value,
- error_code&
- >::type
- operator=(E _e)
- {*this = make_error_code(_e); return *this;}
+ typename std::enable_if<is_error_code_enum<E>::value, error_code &>::type
+ operator=(E _e) {
+ *this = make_error_code(_e);
+ return *this;
+ }
void clear() {
_val_ = 0;
@@ -892,9 +888,9 @@ enum _ {
};
-template <> struct is_error_code_enum<windows_error> : true_type { };
+template <> struct is_error_code_enum<windows_error> : std::true_type { };
-template <> struct is_error_code_enum<windows_error::_> : true_type { };
+template <> struct is_error_code_enum<windows_error::_> : std::true_type { };
inline error_code make_error_code(windows_error e) {
return error_code(static_cast<int>(e), system_category());