summaryrefslogtreecommitdiffstats
path: root/libcxx/include/system_error
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2011-12-02 19:36:40 +0000
committerHoward Hinnant <hhinnant@apple.com>2011-12-02 19:36:40 +0000
commit75689c1018ffcacb3d4771297f439822882313c6 (patch)
tree23800a8cca037e23b8a49f0fa0778c6c983283a2 /libcxx/include/system_error
parent70f7213d2cf81b2dba91ec939e44f07c975e684e (diff)
downloadbcm5719-llvm-75689c1018ffcacb3d4771297f439822882313c6.tar.gz
bcm5719-llvm-75689c1018ffcacb3d4771297f439822882313c6.zip
Fix http://llvm.org/bugs/show_bug.cgi?id=11428. Fix provided by Alberto Ganesh Barbati
llvm-svn: 145698
Diffstat (limited to 'libcxx/include/system_error')
-rw-r--r--libcxx/include/system_error15
1 files changed, 4 insertions, 11 deletions
diff --git a/libcxx/include/system_error b/libcxx/include/system_error
index c9a8097d510..971be337472 100644
--- a/libcxx/include/system_error
+++ b/libcxx/include/system_error
@@ -245,9 +245,8 @@ struct _LIBCPP_VISIBLE is_error_condition_enum
// for them:
//enum class errc
-struct errc
+_LIBCPP_DECLARE_STRONG_ENUM(errc)
{
-enum _ {
address_family_not_supported = EAFNOSUPPORT,
address_in_use = EADDRINUSE,
address_not_available = EADDRNOTAVAIL,
@@ -343,23 +342,17 @@ enum _ {
value_too_large = EOVERFLOW,
wrong_protocol_type = EPROTOTYPE
};
-
- _ __v_;
-
- _LIBCPP_ALWAYS_INLINE
- errc(_ __v) : __v_(__v) {}
- _LIBCPP_ALWAYS_INLINE
- operator int() const {return __v_;}
-
-};
+_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(errc)
template <>
struct _LIBCPP_VISIBLE is_error_condition_enum<errc>
: true_type { };
+#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
template <>
struct _LIBCPP_VISIBLE is_error_condition_enum<errc::_>
: true_type { };
+#endif
class error_condition;
class error_code;
OpenPOWER on IntegriCloud