forked from boostorg/endian
Document endian_reverse_inplace for arrays
This commit is contained in:
@ -93,6 +93,9 @@ namespace endian
|
|||||||
template <class EndianReversible>
|
template <class EndianReversible>
|
||||||
void endian_reverse_inplace(EndianReversible& x) noexcept;
|
void endian_reverse_inplace(EndianReversible& x) noexcept;
|
||||||
|
|
||||||
|
template<class EndianReversibleInplace, std::size_t N>
|
||||||
|
void endian_reverse_inplace(EndianReversibleInplace (&x)[N]) noexcept;
|
||||||
|
|
||||||
template <class EndianReversibleInplace>
|
template <class EndianReversibleInplace>
|
||||||
void big_to_native_inplace(EndianReversibleInplace& x) noexcept;
|
void big_to_native_inplace(EndianReversibleInplace& x) noexcept;
|
||||||
template <class EndianReversibleInplace>
|
template <class EndianReversibleInplace>
|
||||||
@ -241,9 +244,10 @@ If `T` is a class type, the function:
|
|||||||
|===
|
|===
|
||||||
|Expression |Requirements
|
|Expression |Requirements
|
||||||
|`endian_reverse_inplace(mlx)`
|
|`endian_reverse_inplace(mlx)`
|
||||||
a|`T` is an integral type, an enumeration type, `float`, `double`, or a class type.
|
a|`T` is an integral type, an enumeration type, `float`, `double`, a class type,
|
||||||
|
or an array type.
|
||||||
|
|
||||||
If `T` is not a class type, reverses the order of bytes in `mlx`.
|
If `T` is not a class type or an array type, reverses the order of bytes in `mlx`.
|
||||||
|
|
||||||
If `T` is a class type, the function:
|
If `T` is a class type, the function:
|
||||||
|
|
||||||
@ -252,6 +256,8 @@ If `T` is a class type, the function:
|
|||||||
* Should reverse the order of bytes of all data members of `mlx` that have types or
|
* Should reverse the order of bytes of all data members of `mlx` that have types or
|
||||||
arrays of types that meet the `EndianReversible` or `EndianReversibleInplace`
|
arrays of types that meet the `EndianReversible` or `EndianReversibleInplace`
|
||||||
requirements.
|
requirements.
|
||||||
|
|
||||||
|
If `T` is an array type, calls `endian_reverse_inplace` on each element.
|
||||||
|===
|
|===
|
||||||
|
|
||||||
NOTE: Because there is a function template for `endian_reverse_inplace` that
|
NOTE: Because there is a function template for `endian_reverse_inplace` that
|
||||||
@ -362,6 +368,15 @@ Effects:: When `EndianReversible` is a class type,
|
|||||||
order of the constituent bytes of `x`. Otherwise, the program is
|
order of the constituent bytes of `x`. Otherwise, the program is
|
||||||
ill-formed.
|
ill-formed.
|
||||||
|
|
||||||
|
```
|
||||||
|
template<class EndianReversibleInplace, std::size_t N>
|
||||||
|
void endian_reverse_inplace(EndianReversibleInplace (&x)[N]) noexcept;
|
||||||
|
```
|
||||||
|
[none]
|
||||||
|
* {blank}
|
||||||
|
+
|
||||||
|
Effects:: Calls `endian_reverse_inplace(x[i])` for `i` from `0` to `N-1`.
|
||||||
|
|
||||||
```
|
```
|
||||||
template <class EndianReversibleInplace>
|
template <class EndianReversibleInplace>
|
||||||
void big_to_native_inplace(EndianReversibleInplace& x) noexcept;
|
void big_to_native_inplace(EndianReversibleInplace& x) noexcept;
|
||||||
|
Reference in New Issue
Block a user