]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
system_error (error_category::error_category()): LWG 2145: Declare public and constexpr.
authorJonathan Wakely <jwakely.gcc@gmail.com>
Sat, 18 May 2013 23:11:48 +0000 (23:11 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Sat, 18 May 2013 23:11:48 +0000 (00:11 +0100)
* include/std/system_error (error_category::error_category()): LWG
2145: Declare public and constexpr.
* src/c++11/system_error.cc (error_category::error_category()): Move
definition to ...
* src/c++11/compatibility-c++0x.cc: Here.

From-SVN: r199071

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/system_error
libstdc++-v3/src/c++11/compatibility-c++0x.cc
libstdc++-v3/src/c++11/system_error.cc

index 1c871c0fb2964ed6b067dc8a19f2ab5e74a1b31a..a59c5d6b9b5ec0ea70b9ff31e69e1fc83d1d9049 100644 (file)
@@ -1,3 +1,11 @@
+2013-05-18  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       * include/std/system_error (error_category::error_category()): LWG
+       2145: Declare public and constexpr.
+       * src/c++11/system_error.cc (error_category::error_category()): Move
+       definition to ...
+       * src/c++11/compatibility-c++0x.cc: Here.
+
 2013-05-18  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
        * include/std/typeindex (type_index::name()): LWG 2144: Add noexcept.
index b63b74e1f93ecf07cb2bc417e1b4b31ebe49d6df..d66b8714e03b0edcef98f3076b11c369d51343da 100644 (file)
@@ -65,11 +65,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   /// error_category
   class error_category
   {
-  protected:
+  public:
+#ifdef _GLIBCXX_COMPATIBILITY_CXX0X
     error_category() noexcept;
+#else
+    constexpr error_category() noexcept = default;
+#endif
 
-  public:
-    virtual ~error_category() noexcept;
+    virtual ~error_category();
 
     error_category(const error_category&) = delete;
     error_category& operator=(const error_category&) = delete;
index fc84a5e23ec9be6522617f4afff54230b7929520..64a4a6c098468a14539ee036bb750c066b6c256a 100644 (file)
@@ -119,6 +119,10 @@ namespace std _GLIBCXX_VISIBILITY(default)
     };
     constexpr bool system_clock::is_monotonic;
   } // namespace chrono
+
+  // gcc-4.9.0
+  // LWG 2145 changes this constructor to constexpr i.e. inline
+  error_category::error_category() noexcept = default;
 }
 
 #endif
index 453c6877b03270cefb7c10ac97b343b6f85db454..65dcef3f1344e7046999cec7994739b026ccaf70 100644 (file)
@@ -70,8 +70,6 @@ namespace std _GLIBCXX_VISIBILITY(default)
 {
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
-  error_category::error_category() noexcept = default;
-
   error_category::~error_category() noexcept = default;
 
   const error_category&