LWG 2145 - mark constructor for std::error_category as inline and constexpr. Leave the (existing, out-of-line, non-constexpr) in the dylib for compatibility with existing programs)


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188858 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/system_error b/include/system_error
index ac3fb44..df668cc 100644
--- a/include/system_error
+++ b/include/system_error
@@ -22,6 +22,7 @@
 public:
     virtual ~error_category() noexcept;
 
+    constexpr error_category();
     error_category(const error_category&) = delete;
     error_category& operator=(const error_category&) = delete;
 
@@ -366,7 +367,11 @@
 public:
     virtual ~error_category() _NOEXCEPT;
 
+#ifdef _LIBCPP_BUILDING_SYSTEM_ERROR
     error_category() _NOEXCEPT;
+#else
+    _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR_AFTER_CXX11 error_category() _NOEXCEPT {}
+#endif
 private:
     error_category(const error_category&);// = delete;
     error_category& operator=(const error_category&);// = delete;