Reorder constructor overloads

This commit is contained in:
Peter Dimov committed 2021-09-16 18:04:27 +03:00
1 parent b507b2294e
commit 984f8f1a92
2 files changed
+20 -19

No files matched your search

+13 -13
View File
@@ -564,12 +564,12 @@ namespace boost {
constexpr error_code() noexcept;
constexpr error_code( int val, const error_category & cat ) noexcept;
template <class ErrorCodeEnum>
constexpr error_code( ErrorCodeEnum e ) noexcept;
error_code( int val, const error_category & cat,
boost::source_location const * loc ) noexcept;
template <class ErrorCodeEnum>
constexpr error_code( ErrorCodeEnum e ) noexcept;
error_code( std::error_code const& ec ) noexcept;
// modifiers:
@@ -684,16 +684,6 @@ constexpr error_code( int val, const error_category & cat ) noexcept;
+
Ensures: :: `value() == val`; `category() == cat`; `!has_location()`.
```
template <class ErrorCodeEnum>
constexpr error_code( ErrorCodeEnum e ) noexcept;
```
[none]
* {blank}
+
Ensures: :: `*this == make_error_code( e )`.
Remarks: :: This constructor is only enabled when `is_error_code_enum<ErrorCodeEnum>::value` is `true`.
```
error_code( int val, const error_category & cat,
boost::source_location const * loc ) noexcept;
@@ -704,6 +694,16 @@ error_code( int val, const error_category & cat,
Requires: :: `loc` points to a valid `boost::source_location` object with static storage duration.
Ensures: :: `value() == val`; `category() == cat`; `has_location()`; `&location() == loc`.
```
template <class ErrorCodeEnum>
constexpr error_code( ErrorCodeEnum e ) noexcept;
```
[none]
* {blank}
+
Ensures: :: `*this == make_error_code( e )`.
Remarks: :: This constructor is only enabled when `is_error_code_enum<ErrorCodeEnum>::value` is `true`.
```
error_code( std::error_code const & ec ) noexcept;
```