forked from boostorg/system
Update indentation in reference
This commit is contained in:
@@ -54,12 +54,12 @@ the old names, but will provide them when the macro `BOOST_SYSTEM_ENABLE_DEPRECA
|
|||||||
|
|
||||||
```
|
```
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace system {
|
namespace system {
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
struct is_error_code_enum { static const bool value = false; };
|
struct is_error_code_enum { static const bool value = false; };
|
||||||
|
|
||||||
} // namespace system
|
} // namespace system
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -74,12 +74,12 @@ be provided in the same namespace as the enumeration type.
|
|||||||
|
|
||||||
```
|
```
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace system {
|
namespace system {
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
struct is_error_condition_enum { static const bool value = false; };
|
struct is_error_condition_enum { static const bool value = false; };
|
||||||
|
|
||||||
} // namespace system
|
} // namespace system
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -94,9 +94,9 @@ should be provided in the same namespace as the enumeration type.
|
|||||||
|
|
||||||
```
|
```
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace system {
|
namespace system {
|
||||||
|
|
||||||
namespace errc {
|
namespace errc {
|
||||||
enum errc_t
|
enum errc_t
|
||||||
{
|
{
|
||||||
success = 0,
|
success = 0,
|
||||||
@@ -180,15 +180,15 @@ namespace boost {
|
|||||||
wrong_protocol_type //EPROTOTYPE
|
wrong_protocol_type //EPROTOTYPE
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace errc
|
} // namespace errc
|
||||||
|
|
||||||
template<> struct is_error_condition_enum<errc::errc_t>
|
template<> struct is_error_condition_enum<errc::errc_t>
|
||||||
{ static const bool value = true; };
|
{ static const bool value = true; };
|
||||||
|
|
||||||
constexpr error_code make_error_code( errc::errc_t e ) noexcept;
|
constexpr error_code make_error_code( errc::errc_t e ) noexcept;
|
||||||
constexpr error_condition make_error_condition( errc::errc_t e ) noexcept;
|
constexpr error_condition make_error_condition( errc::errc_t e ) noexcept;
|
||||||
|
|
||||||
} // namespace system
|
} // namespace system
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -268,23 +268,23 @@ errors in addition to those defined in Boost.System.
|
|||||||
|
|
||||||
```
|
```
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace system {
|
namespace system {
|
||||||
|
|
||||||
class error_category
|
class error_category
|
||||||
{
|
{
|
||||||
public: // noncopyable
|
public: // noncopyable
|
||||||
|
|
||||||
error_category( error_category const & ) = delete;
|
error_category( error_category const & ) = delete;
|
||||||
error_category& operator=( error_category const & ) = delete;
|
error_category& operator=( error_category const & ) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
~error_category() = default;
|
~error_category() = default;
|
||||||
|
|
||||||
constexpr error_category() noexcept;
|
constexpr error_category() noexcept;
|
||||||
explicit constexpr error_category( unsigned long long id ) noexcept;
|
explicit constexpr error_category( unsigned long long id ) noexcept;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual const char * name() const noexcept = 0;
|
virtual const char * name() const noexcept = 0;
|
||||||
|
|
||||||
@@ -311,13 +311,13 @@ namespace boost {
|
|||||||
|
|
||||||
operator std::error_category const & () const;
|
operator std::error_category const & () const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
unsigned long long id_; // exposition only
|
unsigned long long id_; // exposition only
|
||||||
|
};
|
||||||
|
|
||||||
};
|
} // namespace system
|
||||||
}
|
} // namespace boost
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Constructors
|
#### Constructors
|
||||||
@@ -427,12 +427,16 @@ const char* my_category::message(int ev, char* buffer, size_t len) const noexcep
|
|||||||
case 0: return "no error";
|
case 0: return "no error";
|
||||||
case 1: return "voltage out of range";
|
case 1: return "voltage out of range";
|
||||||
case 2: return "impedance mismatch";
|
case 2: return "impedance mismatch";
|
||||||
|
|
||||||
case 31:
|
case 31:
|
||||||
case 32:
|
case 32:
|
||||||
case 33:
|
case 33:
|
||||||
|
|
||||||
std::snprintf(buffer, len, "component %d failure", ev-30);
|
std::snprintf(buffer, len, "component %d failure", ev-30);
|
||||||
return buffer;
|
return buffer;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
std::snprintf(buffer, len, "unknown error %d", ev);
|
std::snprintf(buffer, len, "unknown error %d", ev);
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
@@ -503,11 +507,11 @@ Returns: :: A reference to an `std::error_category` object corresponding
|
|||||||
|
|
||||||
```
|
```
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace system {
|
namespace system {
|
||||||
|
|
||||||
constexpr const error_category & system_category() noexcept;
|
constexpr const error_category & system_category() noexcept;
|
||||||
|
|
||||||
} // namespace system
|
} // namespace system
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -526,11 +530,11 @@ Returns: :: A reference to a predefined `error_category` object identifying
|
|||||||
|
|
||||||
```
|
```
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace system {
|
namespace system {
|
||||||
|
|
||||||
constexpr const error_category & generic_category() noexcept;
|
constexpr const error_category & generic_category() noexcept;
|
||||||
|
|
||||||
} // namespace system
|
} // namespace system
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -554,12 +558,12 @@ by exception.
|
|||||||
|
|
||||||
```
|
```
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace system {
|
namespace system {
|
||||||
|
|
||||||
class error_code {
|
class error_code {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// constructors:
|
// constructors
|
||||||
|
|
||||||
constexpr error_code() noexcept;
|
constexpr error_code() noexcept;
|
||||||
constexpr error_code( int val, const error_category & cat ) noexcept;
|
constexpr error_code( int val, const error_category & cat ) noexcept;
|
||||||
@@ -572,7 +576,7 @@ namespace boost {
|
|||||||
|
|
||||||
error_code( std::error_code const& ec ) noexcept;
|
error_code( std::error_code const& ec ) noexcept;
|
||||||
|
|
||||||
// modifiers:
|
// modifiers
|
||||||
|
|
||||||
constexpr void assign( int val, const error_category & cat ) noexcept;
|
constexpr void assign( int val, const error_category & cat ) noexcept;
|
||||||
|
|
||||||
@@ -584,7 +588,7 @@ namespace boost {
|
|||||||
|
|
||||||
constexpr void clear() noexcept;
|
constexpr void clear() noexcept;
|
||||||
|
|
||||||
// observers:
|
// observers
|
||||||
|
|
||||||
constexpr int value() const noexcept;
|
constexpr int value() const noexcept;
|
||||||
constexpr const error_category & category() const noexcept;
|
constexpr const error_category & category() const noexcept;
|
||||||
@@ -600,7 +604,7 @@ namespace boost {
|
|||||||
bool has_location() const noexcept;
|
bool has_location() const noexcept;
|
||||||
boost::source_location const & location() const noexcept;
|
boost::source_location const & location() const noexcept;
|
||||||
|
|
||||||
// comparisons:
|
// comparisons
|
||||||
|
|
||||||
friend constexpr bool operator==( const error_code & lhs,
|
friend constexpr bool operator==( const error_code & lhs,
|
||||||
const error_code & rhs ) noexcept;
|
const error_code & rhs ) noexcept;
|
||||||
@@ -641,7 +645,7 @@ namespace boost {
|
|||||||
template<class E>
|
template<class E>
|
||||||
friend constexpr bool operator!=( E lhs, const error_code & rhs ) noexcept;
|
friend constexpr bool operator!=( E lhs, const error_code & rhs ) noexcept;
|
||||||
|
|
||||||
// conversions:
|
// conversions
|
||||||
|
|
||||||
operator std::error_code() const;
|
operator std::error_code() const;
|
||||||
operator std::error_code();
|
operator std::error_code();
|
||||||
@@ -651,19 +655,19 @@ namespace boost {
|
|||||||
|
|
||||||
std::string to_string() const;
|
std::string to_string() const;
|
||||||
|
|
||||||
// stream insertion:
|
// stream insertion
|
||||||
|
|
||||||
template <class charT, class traits>
|
template <class charT, class traits>
|
||||||
std::basic_ostream<charT, traits>&
|
friend std::basic_ostream<charT, traits>&
|
||||||
operator<<( basic_ostream<charT, traits>& os, const error_code & ec );
|
operator<<( basic_ostream<charT, traits>& os, const error_code & ec );
|
||||||
};
|
};
|
||||||
|
|
||||||
// non-member functions
|
// non-member functions
|
||||||
|
|
||||||
std::size_t hash_value( const error_code & ec );
|
std::size_t hash_value( const error_code & ec );
|
||||||
|
|
||||||
}
|
} // namespace system
|
||||||
}
|
} // namespace boost
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Constructors
|
#### Constructors
|
||||||
@@ -1034,12 +1038,12 @@ Returns: :: If `ec` wraps a `std::error_code` object `e2`, `std::hash<std::error
|
|||||||
|
|
||||||
```
|
```
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace system {
|
namespace system {
|
||||||
|
|
||||||
class error_condition {
|
class error_condition {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// constructors:
|
// constructors
|
||||||
|
|
||||||
constexpr error_condition() noexcept;
|
constexpr error_condition() noexcept;
|
||||||
constexpr error_condition( int val, const error_category & cat ) noexcept;
|
constexpr error_condition( int val, const error_category & cat ) noexcept;
|
||||||
@@ -1047,7 +1051,7 @@ namespace boost {
|
|||||||
template <class ErrorConditionEnum>
|
template <class ErrorConditionEnum>
|
||||||
constexpr error_condition( ErrorConditionEnum e ) noexcept;
|
constexpr error_condition( ErrorConditionEnum e ) noexcept;
|
||||||
|
|
||||||
// modifiers:
|
// modifiers
|
||||||
|
|
||||||
constexpr void assign( int val, const error_category & cat ) noexcept;
|
constexpr void assign( int val, const error_category & cat ) noexcept;
|
||||||
|
|
||||||
@@ -1056,7 +1060,7 @@ namespace boost {
|
|||||||
|
|
||||||
constexpr void clear() noexcept;
|
constexpr void clear() noexcept;
|
||||||
|
|
||||||
// observers:
|
// observers
|
||||||
|
|
||||||
constexpr int value() const noexcept;
|
constexpr int value() const noexcept;
|
||||||
constexpr const error_category & category() const noexcept;
|
constexpr const error_category & category() const noexcept;
|
||||||
@@ -1067,7 +1071,7 @@ namespace boost {
|
|||||||
constexpr bool failed() const noexcept;
|
constexpr bool failed() const noexcept;
|
||||||
constexpr explicit operator bool() const noexcept;
|
constexpr explicit operator bool() const noexcept;
|
||||||
|
|
||||||
// comparisons:
|
// comparisons
|
||||||
|
|
||||||
friend constexpr bool operator==( const error_condition & lhs,
|
friend constexpr bool operator==( const error_condition & lhs,
|
||||||
const error_condition & rhs ) noexcept;
|
const error_condition & rhs ) noexcept;
|
||||||
@@ -1088,18 +1092,19 @@ namespace boost {
|
|||||||
friend bool operator!=( const error_condition & condition,
|
friend bool operator!=( const error_condition & condition,
|
||||||
const std::error_code & code ) noexcept;
|
const std::error_code & code ) noexcept;
|
||||||
|
|
||||||
// conversions:
|
// conversions
|
||||||
|
|
||||||
operator std::error_condition() const;
|
operator std::error_condition() const;
|
||||||
|
|
||||||
// stream insertion:
|
// stream insertion
|
||||||
|
|
||||||
template <class charT, class traits>
|
template <class charT, class traits>
|
||||||
std::basic_ostream<charT, traits>&
|
friend std::basic_ostream<charT, traits>&
|
||||||
operator<<( basic_ostream<charT, traits>& os, const error_condition & en );
|
operator<<( basic_ostream<charT, traits>& os, const error_condition & en );
|
||||||
};
|
};
|
||||||
}
|
|
||||||
}
|
} // namespace system
|
||||||
|
} // namespace boost
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Constructors
|
#### Constructors
|
||||||
@@ -1295,7 +1300,7 @@ Returns: ::
|
|||||||
|
|
||||||
## <boost/system/{zwsp}system_error.hpp>
|
## <boost/system/{zwsp}system_error.hpp>
|
||||||
|
|
||||||
### Class system_error
|
### system_error
|
||||||
|
|
||||||
The class `system_error` describes an exception object used to
|
The class `system_error` describes an exception object used to
|
||||||
report errors that have an associated `error_code`. Such errors
|
report errors that have an associated `error_code`. Such errors
|
||||||
@@ -1303,13 +1308,12 @@ typically originate from operating system or other low-level
|
|||||||
application program interfaces.
|
application program interfaces.
|
||||||
|
|
||||||
```
|
```
|
||||||
namespace boost
|
namespace boost {
|
||||||
|
namespace system {
|
||||||
|
|
||||||
|
class system_error: public std::runtime_error
|
||||||
{
|
{
|
||||||
namespace system
|
public:
|
||||||
{
|
|
||||||
class system_error: public std::runtime_error
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
explicit system_error( error_code ec );
|
explicit system_error( error_code ec );
|
||||||
system_error( error_code ec, const char * what_arg );
|
system_error( error_code ec, const char * what_arg );
|
||||||
@@ -1323,9 +1327,10 @@ namespace boost
|
|||||||
|
|
||||||
error_code code() const noexcept;
|
error_code code() const noexcept;
|
||||||
const char * what() const noexcept;
|
const char * what() const noexcept;
|
||||||
};
|
};
|
||||||
}
|
|
||||||
}
|
} // namespace system
|
||||||
|
} // namespace boost
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Constructors
|
#### Constructors
|
||||||
|
Reference in New Issue
Block a user