Fix typos

# Conflicts:
#	docs/IO/io_port.md
#	docs/containers/sets/const-multiset.md
#	docs/containers/sets/const-set.md
#	docs/maths/correlation.md
#	docs/maths/gamma.md
This commit is contained in:
Roland Reichwein 2026-05-28 17:59:34 +02:00 committed by John Wellbelove
parent f6ad307832
commit 43c0c4ae71
19 changed files with 66 additions and 55 deletions

View File

@ -102,6 +102,7 @@ Write the value.
```cpp
pointer get_address()
const_pointer get_address() const
```
**Description**
Gets the address of the port.

View File

@ -201,7 +201,7 @@ bus1.receive(ROUTER_ID_1, messageA);
// Address messageA to routers with id ROUTER_ID_3.
bus1.receive(ROUTER_ID_3, messageA);
```
// The call order will be...
// routerD
```

View File

@ -13,7 +13,7 @@ A reverse engineered version of C++20's and C++23's `<bit>` header.
## bit_cast
```cpp
template <typename TDestination, typename TSource>>
template <typename TDestination, typename TSource>
ETL_CONSTEXPR14 TDestination bit_cast(const TSource& source) ETL_NOEXCEPT
```
**Description**
@ -38,7 +38,7 @@ Checks if `n` is a power of two, or has one bit set.
## bit_ceil
```cpp
template <typename T>
ETL_CONSTEXPR14 T bit_ceil(T n);
ETL_CONSTEXPR14 T bit_ceil(T n)
```
**Description**
Calculates the smallest power of two, that is not smaller than `n`.
@ -49,7 +49,7 @@ template <typename T>
ETL_CONSTEXPR14 T bit_floor(T n) ETL_NOEXCEPT
```
**Description**
Calculates the smallest power of two, that is not greater than `n`.
Calculates the largest power of two that is not greater than `n`.
## bit_width
```cpp

View File

@ -98,7 +98,7 @@ Reverse the order of the bytes in a value.
```cpp
template <typename T>
ETL_CONSTEXPR T reverse_bytes(T value)
ETL_CONSTEXPR14 T reverse_bytes(T value)
```
## gray_to_binary
@ -118,15 +118,15 @@ Converts a binary value to the gray code equivalent.
## count_bits
```cpp
template <typename T>
ETL_CONSTEXPR14 T count_bits(T value)
ETL_CONSTEXPR14 uint_least8_t count_bits(T value)
```
**Return**
`1` if the parity of the value is odd, `0` if it is even.
The number of set bits in `value`.
## parity
```cpp
template <typename T>
ETL_CONSTEXPR14 T parity(T value)
ETL_CONSTEXPR14 uint_least8_t parity(T value)
```
**Return**
`1` if the parity of the value is odd, `0` if it is even.
@ -161,7 +161,7 @@ uint32_t result = etl::fold_bits<uint32_t, 20>(0xE8C9AACCBC3D9A8F);
Sign extends a binary number.
```cpp
template <typename TReturn, const size_t NBits, typename TValue>
template <typename TReturn, size_t NBits, typename TValue>
ETL_CONSTEXPR14 TReturn sign_extend(TValue value)
```
**Description**
@ -169,7 +169,7 @@ Converts an N bit binary number, where bit N-1 is the sign bit, to a signed inte
---
```cpp
template <typename TReturn, const size_t NBits, const size_t Shift, typename TValue>
template <typename TReturn, size_t NBits, size_t Shift, typename TValue>
ETL_CONSTEXPR14 TReturn sign_extend(TValue value)
```
**Description**
@ -196,7 +196,7 @@ Converts an N bit binary number, where bit N-1 is the sign bit, and shift is the
## count_leading_zeros
```cpp
template <typename T>
ETL_CONSTEXPR14 T count_leading_zeros(T value)
ETL_CONSTEXPR14 uint_least8_t count_leading_zeros(T value)
```
**Description**
Counts the number of leading zeros in a binary number
@ -204,7 +204,7 @@ Counts the number of leading zeros in a binary number
## count_trailing_zeros
```cpp
template <typename T>
ETL_CONSTEXPR14 T count_trailing_zeros(T value)
ETL_CONSTEXPR14 uint_least8_t count_trailing_zeros(T value)
```
**Description**
Counts the number of trailing zeros in a binary number
@ -212,7 +212,7 @@ Counts the number of trailing zeros in a binary number
## count_leading_ones
```cpp
template <typename T>
ETL_CONSTEXPR14 T count_leading_ones(T value)
ETL_CONSTEXPR14 uint_least8_t count_leading_ones(T value)
```
**Description**
Counts the number of leading ones in a binary number
@ -220,7 +220,7 @@ Counts the number of leading ones in a binary number
## count_trailing_ones
```cpp
template <typename T>
ETL_CONSTEXPR14 T count_trailing_ones(T value)
ETL_CONSTEXPR14 uint_least8_t count_trailing_ones(T value)
```
**Description**
Counts the number of trailing ones in a binary number
@ -233,7 +233,7 @@ ETL_CONSTEXPR14 uint_least8_t first_set_bit_position(T value)
**Description**
Finds the index of the first set bit from lsb.
## first_clear_position
## first_clear_bit_position
```cpp
template <typename T>
ETL_CONSTEXPR14 uint_least8_t first_clear_bit_position(T value)
@ -265,8 +265,8 @@ etl::binary_fill<uint32_t>(uint8_t(0x12));
---
```cpp
template <typename TResult, typename TValue, TValue N>
ETL_CONSTEXPR TResult binary_fill(TValue value)
template <typename TResult, typename TValue, TValue Value>
ETL_CONSTEXPR TResult binary_fill()
```
*Partial compile time*
@ -278,7 +278,7 @@ etl::binary_fill<uint32_t, uint8_t, 0x12>();
## has_zero_byte
```cpp
template <typename TValue>
ETL_CONSTEXPR14 bool has_zero_byte(const TValue value)
ETL_CONSTEXPR14 bool has_zero_byte(TValue value)
```
*Run time*
Checks to see if a value contains a byte of value zero.
@ -287,6 +287,15 @@ Checks to see if a value contains a byte of value zero.
`etl::has_zero_byte(uint32_t(0x01234567)) == false`
`etl::has_zero_byte(uint32_t(0x01230067)) == true`
---
```cpp
template <typename TValue, TValue Value>
ETL_CONSTEXPR14 bool has_zero_byte()
```
Checks to see if `Value` contains a byte of value zero.
*Compile time value*
## has_byte_n
Checks to see if a value contains a byte of a particular value.
@ -304,7 +313,7 @@ etl::has_byte_n(uint32_t(0x01234567), 0x45) == true
---
```cpp
template <typename TValue, TValue N>
template <typename TValue, TValue Value>
ETL_CONSTEXPR14 bool has_byte_n(TValue value)
```
*Partial compile time*
@ -352,11 +361,8 @@ Interleaves two values such that bits abcd and efgh will result in eafbgchd.
```cpp
ETL_CONSTEXPR14 uint16_t binary_interleave(uint8_t first, uint8_t second);
ETL_CONSTEXPR14 int16_t binary_interleave(int8_t first, int8_t second);
ETL_CONSTEXPR14 uint32_t binary_interleave(uint16_t first, uint16_t second);
ETL_CONSTEXPR14 int32_t binary_interleave(int16_t first, int16_t second);
ETL_CONSTEXPR14 uint64_t binary_interleave(uint32_t first, uint32_t second);
ETL_CONSTEXPR14 int64_t binary_interleave(int32_t first, int32_t second);
```
## Odd / Even
@ -369,7 +375,7 @@ ETL_CONSTEXPR bool is_odd(T value)
```cpp
template <typename T>
ETL_CONSTEXPR bool is_even(T value);
ETL_CONSTEXPR bool is_even(T value)
```
## Constants
@ -473,7 +479,7 @@ From: `20.38.11`
---
```cpp
ETL_CONTEXPR
ETL_CONSTEXPR
binary_not()
```
**Description**
@ -482,9 +488,9 @@ Default constructor.
---
```cpp
ETL_CONTEXPR
ETL_CONSTEXPR
ETL_NODISCARD
T operator(T value)
T operator()(T value) const ETL_NOEXCEPT
```
**Return**
~value.
@ -499,8 +505,8 @@ From: `20.38.11`
---
```cpp
ETL_CONTEXPR
binary_and(T and_value)
ETL_CONSTEXPR
explicit binary_and(T and_value)
```
**Description**
Constructor.
@ -508,9 +514,9 @@ Constructor.
---
```cpp
ETL_CONTEXPR
ETL_CONSTEXPR
ETL_NODISCARD
T operator(T value)
T operator()(T value) const ETL_NOEXCEPT
```
**Return**
`value & and_value`.
@ -525,19 +531,19 @@ From: `20.38.11`
---
```cpp
ETL_CONTEXPR
binary_and(T or_value)
ETL_CONSTEXPR
explicit binary_or(T or_value)
```
**Description**
Constructor.
---
``cpp
ETL_CONTEXPR
```cpp
ETL_CONSTEXPR
ETL_NODISCARD
T operator(T value)
``
T operator()(T value) const ETL_NOEXCEPT
```
**Return**
`value | or_value`.
@ -551,8 +557,8 @@ From: `20.38.11`
---
```cpp
ETL_CONTEXPR
binary_xor(T xor_value)
ETL_CONSTEXPR
explicit binary_xor(T xor_value)
```
**Description**
Constructor.
@ -560,9 +566,9 @@ Constructor.
---
```cpp
ETL_CONTEXPR
ETL_CONSTEXPR
ETL_NODISCARD
T operator(T value)
T operator()(T value) const ETL_NOEXCEPT
```
**Return**
value ^ xor_value.

View File

@ -15,7 +15,7 @@ template <typename T, T MASK = etl::integral_limits<T>::max>
class flags
```
`T` must be an unsigned integral type.
`MASK` is used to exclude unused or undefine bits from operations of the flags. By default, all bits are included.
`MASK` is used to exclude unused or undefined bits from operations of the flags. By default, all bits are included.
Most member functions may be chained.
```cpp
@ -48,7 +48,7 @@ Constructs a flag set with elements set to pattern.
## Modifiers
```cpp
ETL_CONSTEXPR14 flags<T, MASK>& operator =(flags<T, MASK> other) ETL_NOEXCEPT
ETL_CONSTEXPR14 flags<T, MASK>& operator=(flags<T, MASK> other) ETL_NOEXCEPT
```
**Description**
Assigns from another flags object.
@ -56,7 +56,7 @@ Assigns from another flags object.
---
```cpp
ETL_CONSTEXPR14 flags<T, MASK>& operator =(value_type pattern) ETL_NOEXCEPT
ETL_CONSTEXPR14 flags<T, MASK>& operator=(value_type pattern) ETL_NOEXCEPT
```
**Description**
Assigns from a bit pattern.

View File

@ -231,6 +231,7 @@ Subtract `etl::chrono::month` from `etl::chrono::months`.
ETL_CONSTEXPR14
etl::chrono::months operator -(const etl::chrono::month& m1,
const etl::chrono::month& m2) ETL_NOEXCEPT
```
**Description**
Subtract `etl::chrono::month` from `etl::chrono::month`.
**Return**

View File

@ -20,7 +20,7 @@ There are intrusive versions of certain containers. These do not store copies of
Most intrusive containers do not have a maximum fixed capacity.
See here for more information.
To eliminate code bloat, most container templates utilise 'hoisting' where functionality, independent of the sizeand/or type, is separated out in to base classes.
To eliminate code bloat, most container templates utilise 'hoisting' where functionality, independent of the size and/or type, is separated out in to base classes.
For example, `vector<int, 5>` and `vector<int, 10>` will share code from `ivector<int>`.
`vector<int, 5>`, `vector<float, 7>` and `vector<int, 10>` will all share code from `vector_base`.

View File

@ -11,5 +11,5 @@ hugo server --disableFastRender
## Generate hugo for remote host
```bash
hugo --cleanDestinationDir
hugo --baseURL "https://www.your-web-site.com"`
hugo --baseURL "https://www.your-web-site.com"
```

View File

@ -10,7 +10,7 @@ The files are located in `etl/docs` and are grouped in various sub-directories.
Updates to the documentation may be made to these files.
Any new documentation should follow the style of the existing pages.
The docmentation can be viewed by any **Markdown** viewer that can render **CommonMark** compliant formatting.
The documentation can be viewed by any **Markdown** viewer that can render **CommonMark** compliant formatting.
Be aware that internal links to other pages may either not work, or take you to the online site.
The best way to view the documentation locally is to install **Hugo**.

View File

@ -139,7 +139,7 @@ Random access iterator
```cpp
ETL_CONSTEXPR14 circular_iterator& operator --()
``
```
Decrement
Bidirectional iterator
Random access iterator

View File

@ -14,7 +14,7 @@ template <typename TInput>
class invert : public etl::unary_function<TInput, TInput>
```
``TInput``` The input data type.
`TInput` The input data type.
```cpp
invert()

View File

@ -36,7 +36,7 @@ C++17 and above
```cpp
template <size_t N>
inline constexpr size_t log2_v = log2<N>::value;
``
```
## log10
```cpp

View File

@ -31,7 +31,7 @@ Constructor.
```cpp
TInput operator()(TInput value) const
```
**Description**
**Description**
Gamma a value.
---

View File

@ -141,6 +141,7 @@ template <typename T1, typename T2>
ETL_CONSTEXPR14
etl::common_type_t<T1, T2>
divide_round_half_down(T1 numerator, T2 denominator) ETL_NOEXCEPT
```
```cpp
.151 / 100 == 3
.150 / 100 == 2

View File

@ -100,7 +100,7 @@ Trims all of the characters in up to the first character in `delimiters` from bo
---
...cpp
```cpp
void reverse(etl::istring& s)
```
**Description**
@ -328,7 +328,7 @@ If the string is less than `n` characters long then the returned view equal the
---
```cppp
```cpp
etl::optional<etl::string_view> get_token(const INPUT_TYPE& s,
const char* delimiters,
const etl::optional<etl::string_view>& last_view,

View File

@ -412,6 +412,8 @@ etl::hash<etl::wstring_view>
etl::hash<etl::u8string_view>
etl::hash<etl::u16string_view>
etl::hash<etl::u32string_view>
```
---
**Example**

View File

@ -83,7 +83,6 @@ Enables or disables the timer manager according to the state.
bool is_running() const
```
**Description**
```cpp
Returns `true` if the timer manager is enabled.
---

View File

@ -80,7 +80,8 @@ Can be initialised like a C array.
```cpp
etl::array<int, 10> data = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
---
```
### Access
```cpp

View File

@ -271,7 +271,7 @@ Destroy the object at `p`.
In a debug build the pointer is checked for correct alignment. An etl::alignment_error is asserted if incorrect.
From: `20.35.12`
## uninitialzed_fill
## uninitialized_fill
Fills uninitialised memory with N values.
```cpp