aboutsummaryrefslogtreecommitdiff
path: root/include/system_error
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2014-01-29 19:30:27 +0000
committerDimitry Andric <dim@FreeBSD.org>2014-01-29 19:30:27 +0000
commita5b2dbc259e289ea23fe9aebb34eba2c1dc7fefb (patch)
tree5812a629bd48b0968dee7411809c6a6a19680390 /include/system_error
parent1c9014238e909c768bf84564733b5441d5c9ea2b (diff)
downloadsrc-a5b2dbc259e289ea23fe9aebb34eba2c1dc7fefb.tar.gz
src-a5b2dbc259e289ea23fe9aebb34eba2c1dc7fefb.zip
Vendor import of libc++ tags/RELEASE_34/final r197960:vendor/libc++/r197960
Notes
Notes: svn path=/vendor/libc++/dist/; revision=261272 svn path=/vendor/libc++/r197960/; revision=261273; tag=vendor/libc++/r197960
Diffstat (limited to 'include/system_error')
-rw-r--r--include/system_error22
1 files changed, 14 insertions, 8 deletions
diff --git a/include/system_error b/include/system_error
index 1c1c7ebddf37..66bf6d6c4249 100644
--- a/include/system_error
+++ b/include/system_error
@@ -22,6 +22,7 @@ class error_category
public:
virtual ~error_category() noexcept;
+ constexpr error_category();
error_category(const error_category&) = delete;
error_category& operator=(const error_category&) = delete;
@@ -232,13 +233,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// is_error_code_enum
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_error_code_enum
+struct _LIBCPP_TYPE_VIS_ONLY is_error_code_enum
: public false_type {};
// is_error_condition_enum
template <class _Tp>
-struct _LIBCPP_TYPE_VIS is_error_condition_enum
+struct _LIBCPP_TYPE_VIS_ONLY is_error_condition_enum
: public false_type {};
// Some error codes are not present on all platforms, so we provide equivalents
@@ -345,12 +346,12 @@ _LIBCPP_DECLARE_STRONG_ENUM(errc)
_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(errc)
template <>
-struct _LIBCPP_TYPE_VIS is_error_condition_enum<errc>
+struct _LIBCPP_TYPE_VIS_ONLY is_error_condition_enum<errc>
: true_type { };
#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
template <>
-struct _LIBCPP_TYPE_VIS is_error_condition_enum<errc::__lx>
+struct _LIBCPP_TYPE_VIS_ONLY is_error_condition_enum<errc::__lx>
: true_type { };
#endif
@@ -366,7 +367,12 @@ class _LIBCPP_TYPE_VIS error_category
public:
virtual ~error_category() _NOEXCEPT;
+#ifdef _LIBCPP_BUILDING_SYSTEM_ERROR
error_category() _NOEXCEPT;
+#else
+ _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_CONSTEXPR_AFTER_CXX11 error_category() _NOEXCEPT _LIBCPP_DEFAULT;
+#endif
private:
error_category(const error_category&);// = delete;
error_category& operator=(const error_category&);// = delete;
@@ -397,8 +403,8 @@ public:
virtual string message(int ev) const;
};
-const error_category& generic_category() _NOEXCEPT;
-const error_category& system_category() _NOEXCEPT;
+_LIBCPP_FUNC_VIS const error_category& generic_category() _NOEXCEPT;
+_LIBCPP_FUNC_VIS const error_category& system_category() _NOEXCEPT;
class _LIBCPP_TYPE_VIS error_condition
{
@@ -597,7 +603,7 @@ operator!=(const error_condition& __x, const error_condition& __y) _NOEXCEPT
{return !(__x == __y);}
template <>
-struct _LIBCPP_TYPE_VIS hash<error_code>
+struct _LIBCPP_TYPE_VIS_ONLY hash<error_code>
: public unary_function<error_code, size_t>
{
_LIBCPP_INLINE_VISIBILITY
@@ -629,7 +635,7 @@ private:
static string __init(const error_code&, string);
};
-void __throw_system_error(int ev, const char* what_arg);
+_LIBCPP_FUNC_VIS void __throw_system_error(int ev, const char* what_arg);
_LIBCPP_END_NAMESPACE_STD