Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#7278 closed Feature Requests (fixed)

Add noexcept to conform with C++11

Reported by: viboes Owned by: Beman Dawes
Milestone: Boost 1.54.0 Component: system
Version: Boost 1.51.0 Severity: Problem
Keywords: Cc:

Description (last modified by viboes)

I'm adding BOOST_NOEXCEPT specification to Boost.Thread (#7279), and I can not complete it as Boost.System lacks this feature.

    class error_category {
    public:
      virtual const char* name() const noexcept = 0;
      virtual error_condition default_error_condition(int ev) const noexcept;
      virtual bool equivalent(int code, const error_condition& condition) const noexcept;
      virtual bool equivalent(const error_code& code, int condition) const noexcept;
      bool operator==(const error_category& rhs) const noexcept;
      bool operator!=(const error_category& rhs) const noexcept;
      bool operator<(const error_category& rhs) const noexcept;
    };
    const error_category& generic_category() noexcept;
    const error_category& system_category() noexcept;


    class error_code {
    public:
        error_code() noexcept;
        error_code(int val, const error_category& cat) noexcept; 
        template <class ErrorCodeEnum>
        error_code(ErrorCodeEnum e) noexcept;
        void assign(int val, const error_category& cat) noexcept; 
        template <class ErrorCodeEnum>
        errorcode& operator=(ErrorCodeEnum e) noexcept;
        void clear() noexcept;
        int value() const noexcept;
        const error_category& category() const noexcept; 
        error_condition default_error_condition() const noexcept; 
        explicit operator bool() const noexcept;
    };
    error_code make_error_code(errc e) noexcept;
    bool operator<(const error_code& lhs, const error_code& rhs) noexcept;

    class error_condition {
    public:
        error_condition() noexcept;
        error_condition(int val, const error_category& cat) noexcept; 
        template <class ErrorConditionEnum>
        error_condition(ErrorConditionEnum e) noexcept;
        void assign(int val, const error_category& cat) noexcept;         
        template<class ErrorConditionEnum>
        error_condition& operator=(ErrorConditionEnum e) noexcept;
        void clear() noexcept;
        int value() const noexcept;
        const error_category& category() const noexcept; 
        explicit operator bool() const noexcept;
    };
    bool operator<(const error_condition& lhs, const error_condition& rhs) noexcept;

Any plans to take care of this?

Attachments (2)

7278.patch (21.9 KB ) - added by viboes 10 years ago.
Multi-lib patch
7278_2.patch (1.0 KB ) - added by viboes 10 years ago.
complements to take care of discussions on the ML.

Download all attachments as: .zip

Change History (11)

comment:1 by viboes, 10 years ago

Component: mathsystem
Owner: changed from John Maddock to Beman Dawes

comment:2 by viboes, 10 years ago

Description: modified (diff)

comment:3 by viboes, 10 years ago

Description: modified (diff)

comment:4 by viboes, 10 years ago

Description: modified (diff)

comment:5 by viboes, 10 years ago

Description: modified (diff)

comment:6 by Beman Dawes, 10 years ago

Status: newassigned

by viboes, 10 years ago

Attachment: 7278.patch added

Multi-lib patch

by viboes, 10 years ago

Attachment: 7278_2.patch added

complements to take care of discussions on the ML.

comment:7 by Beman Dawes, 10 years ago

Resolution: fixed
Status: assignedclosed

Initial changes made by changeset 81808, with further cleanup by 83197. Docs updated by 83197.

comment:8 by viboes, 10 years ago

Milestone: To Be DeterminedBoost 1.54.0

Could I merge this ticket to release branch?

  svn merge -c 81808 "^/trunk"
  svn merge -c 83197 "^/trunk"
Last edited 10 years ago by viboes (previous) (diff)

comment:9 by viboes, 10 years ago

(In [83550]) System/FileSystem: merge from trunk to fix #7278.

Note: See TracTickets for help on using tickets.