summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-18 23:11:48 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-18 23:11:48 +0000
commit475ac686fff3caa7bb7c20b6235aa3856a048fad (patch)
tree03d2d45177496af130cabec5c190cef3f422ae48
parent1e0a92ace28abc6044f2c805ebc5d8c62a98a57a (diff)
downloadppe42-gcc-475ac686fff3caa7bb7c20b6235aa3856a048fad.tar.gz
ppe42-gcc-475ac686fff3caa7bb7c20b6235aa3856a048fad.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199071 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog8
-rw-r--r--libstdc++-v3/include/std/system_error9
-rw-r--r--libstdc++-v3/src/c++11/compatibility-c++0x.cc4
-rw-r--r--libstdc++-v3/src/c++11/system_error.cc2
4 files changed, 18 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 1c871c0fb29..a59c5d6b9b5 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,13 @@
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.
2013-05-18 Jonathan Wakely <jwakely.gcc@gmail.com>
diff --git a/libstdc++-v3/include/std/system_error b/libstdc++-v3/include/std/system_error
index b63b74e1f93..d66b8714e03 100644
--- a/libstdc++-v3/include/std/system_error
+++ b/libstdc++-v3/include/std/system_error
@@ -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;
diff --git a/libstdc++-v3/src/c++11/compatibility-c++0x.cc b/libstdc++-v3/src/c++11/compatibility-c++0x.cc
index fc84a5e23ec..64a4a6c0984 100644
--- a/libstdc++-v3/src/c++11/compatibility-c++0x.cc
+++ b/libstdc++-v3/src/c++11/compatibility-c++0x.cc
@@ -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
diff --git a/libstdc++-v3/src/c++11/system_error.cc b/libstdc++-v3/src/c++11/system_error.cc
index 453c6877b03..65dcef3f134 100644
--- a/libstdc++-v3/src/c++11/system_error.cc
+++ b/libstdc++-v3/src/c++11/system_error.cc
@@ -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&
OpenPOWER on IntegriCloud