_GLIBCXX_THROW_OR_ABORT(system_error(error_code(__i, generic_category())));
}
- error_category::~error_category() noexcept = default;
+ error_category::~error_category() = default;
const error_category&
_V2::system_category() noexcept { return system_category_instance; }
const error_category&
_V2::generic_category() noexcept { return generic_category_instance; }
- system_error::~system_error() noexcept = default;
+ system_error::~system_error() = default;
error_condition
error_category::default_error_condition(int __i) const noexcept
--- /dev/null
+// { dg-do compile { target c++11 } }
+#include <system_error>
+
+extern const std::error_category& cat;
+
+static_assert(std::is_nothrow_destructible<std::error_category>::value, "");
+static_assert(noexcept(cat.name()), "");
+static_assert(noexcept(cat.default_error_condition(1)), "");
+static_assert(noexcept(cat.equivalent(1, {})), "");
+static_assert(noexcept(cat.equivalent({}, 1)), "");
+static_assert(noexcept(cat == cat), "");
+static_assert(noexcept(cat != cat), "");
+static_assert(noexcept(cat < cat), "");
--- /dev/null
+// { dg-do compile { target c++11 } }
+#include <system_error>
+
+static_assert(std::is_nothrow_destructible<std::system_error>::value, "");
+static_assert(noexcept(std::declval<const std::system_error&>().code()), "");
+static_assert(noexcept(std::declval<const std::system_error&>().what()), "");