]> git.ipfire.org Git - thirdparty/gcc.git/commit - libstdc++-v3/testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc
system_error (is_error_code_enum): Specialize for errc.
authorChris Fairles <cfairles@gcc.gnu.org>
Wed, 22 Oct 2008 15:27:44 +0000 (15:27 +0000)
committerChris Fairles <cfairles@gcc.gnu.org>
Wed, 22 Oct 2008 15:27:44 +0000 (15:27 +0000)
commit92010a793b9bc51b3312d9e07f3e83dc86ed1ddc
tree1982e8d2183d71a4fdf9f068b3bdf561915edb14
parentb8a19ec4860dcd9c9dba47902b414706479fa4f7
system_error (is_error_code_enum): Specialize for errc.

2008-10-22  Chris Fairles  <cfairles@gcc.gnu.org>

        * include/std/system_error (is_error_code_enum): Specialize for errc.
        (error_category::error_category): Defaulted and protected.
        (error_category::~error_category): New, virtual.
        (error_category::error_category(const error_category&),
        error_category::operator=(const error_category&)): Deleted.
        (get_system_category, get_posix_category): Remove (DR 890).
        (system_category): External linkage (DR 890).
        (posix_category): Remove.
        (generic_category): Add. External linkage (DR 890).
        (error_code::error_code<>(_ErrorCodeEnum)): Use generic_category.
        (error_code::clear, error_code::operator=<>(_ErrorCodeEnum)): Forward to
        error_code::assign, use generic_category.
        (error_condition::error_condition,
        error_condition::error_condition<>(_ErrorConditionEnum)): Use
        generic_category.
        (error_condition::clear,
        error_condition::operator=<>(_ErrorConditionEnum)): Forward to
        error_code::assign, use generic_category.
        (make_error_code, make_error_condition): Define in namespace std.
        * include/std/mutex (unique_lock<>::lock, unique_lock<>::try_lock,
        unique_lock<>::try_lock_until<>(duration),
        unique_lock<>::try_lock_for<>(duration)): Replace posix_error with errc.
        * src/system_error.cc (system_error_category, generic_error_category):
        New.
        (gnu_error_category): Remove.
        (get_system_category, get_posix_category): Remove (DR 890).
        (system_category, generic_category): Define.
        * src/functexcept.cc (__throw_system_error): Use generic_category.
        * config/abi/pre/gnu.ver: Export system_category and generic_category,
        remove get_system_category and get_generic_category (DR 890).
        * config/os/generic/error_constants.h (posix_errno): Rename to errc, use
        enum class type. Fix spelling.
        * config/os/mingw32/error_constants.h (posix_errno): Likewise.
        * testsuite/19_diagnostics/error_code/cons/1.cc: Use errc and
        generic_category.
        * testsuite/19_diagnostics/error_code/operators/bool.cc: Use errc.
        * testsuite/19_diagnostics/error_code/operators/equal.cc: Likewise.
        * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Likewise.
        * testsuite/19_diagnostics/error_category/cons/copy_neg.cc: Update
        dg-error line numbers.
        * testsuite/19_diagnostics/error_condition/cons/1.cc: Use
        generic_category.
        * testsuite/19_diagnostics/error_condition/operators/bool.cc: Use errc.
        * testsuite/19_diagnostics/error_condition/operators/equal.cc: Likewise.
        * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
        Likewise.
        * testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc: New.
        * testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc:
        Remove using tests since errc is not a namespace.
        * testsuite/19_diagnostics/system_error/cons-1.cc: Use errc.
        * testsuite/19_diagnostics/system_error/what-4.cc: Likewise.
        * testsuite/27_io/basic_ostream/inserters_other/wchar_t/error_code.cc:
        Likewise.
        * testsuite/27_io/basic_ostream/inserters_other/char/error_code.cc:
        Likewise.
        * testsuite/30_threads/unique_lock/locking/2.cc: Likewise.

From-SVN: r141297
24 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/config/abi/pre/gnu.ver
libstdc++-v3/config/os/generic/error_constants.h
libstdc++-v3/config/os/mingw32/error_constants.h
libstdc++-v3/include/std/mutex
libstdc++-v3/include/std/system_error
libstdc++-v3/src/functexcept.cc
libstdc++-v3/src/system_error.cc
libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc
libstdc++-v3/testsuite/19_diagnostics/error_code/cons/1.cc
libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc
libstdc++-v3/testsuite/19_diagnostics/error_code/operators/equal.cc
libstdc++-v3/testsuite/19_diagnostics/error_code/operators/not_equal.cc
libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/1.cc
libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/bool.cc
libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/equal.cc
libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/not_equal.cc
libstdc++-v3/testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc [new file with mode: 0644]
libstdc++-v3/testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc
libstdc++-v3/testsuite/19_diagnostics/system_error/cons-1.cc
libstdc++-v3/testsuite/19_diagnostics/system_error/what-4.cc
libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/error_code.cc
libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/error_code.cc
libstdc++-v3/testsuite/30_threads/unique_lock/locking/2.cc