|
constexpr | variable_size_binary_reference (L *layout, size_type index) |
| Constructs a variable-size binary reference for the given layout and index.
|
|
constexpr | variable_size_binary_reference (const variable_size_binary_reference &)=default |
|
constexpr | variable_size_binary_reference (variable_size_binary_reference &&)=default |
|
template<std::ranges::sized_range T>
requires mpl::convertible_ranges<T, typename L::inner_value_type> |
constexpr self_type & | operator= (T &&rhs) |
| Assignment from a sized range of binary data.
|
|
template<class U = typename L::inner_value_type>
requires std::assignable_from<U&, const char*> |
constexpr self_type & | operator= (const char *rhs) |
| Assignment from a C-string.
|
|
constexpr size_type | size () const |
| Gets the size of the binary element in bytes/characters.
|
|
constexpr bool | empty () const |
| Checks if the binary element is empty.
|
|
constexpr iterator | begin () |
| Gets mutable iterator to the beginning of binary data.
|
|
constexpr iterator | end () |
| Gets mutable iterator to the end of binary data.
|
|
constexpr const_iterator | begin () const |
| Gets const iterator to the beginning of binary data.
|
|
constexpr const_iterator | end () const |
| Gets const iterator to the end of binary data.
|
|
constexpr const_iterator | cbegin () const |
| Gets const iterator to the beginning of binary data.
|
|
constexpr const_iterator | cend () const |
| Gets const iterator to the end of binary data.
|
|
template<std::ranges::input_range T>
requires mpl::convertible_ranges<T, typename L::inner_value_type> |
constexpr bool | operator== (const T &rhs) const |
| Equality comparison with another range of binary data.
|
|
template<class U = typename L::inner_value_type>
requires std::assignable_from<U&, const char*> |
constexpr bool | operator== (const char *rhs) const |
| Equality comparison with a C-string.
|
|
template<std::ranges::input_range T>
requires mpl::convertible_ranges<T, typename L::inner_value_type> |
constexpr auto | operator<=> (const T &rhs) const |
| Three-way comparison with another range of binary data.
|
|
template<class U = typename L::inner_value_type>
requires std::assignable_from<U&, const char*> |
constexpr auto | operator<=> (const char *rhs) const |
| Three-way comparison with a C-string.
|
|
template<std::ranges::sized_range T>
requires mpl::convertible_ranges<T, typename L::inner_value_type> |
constexpr auto | operator= (T &&rhs) -> self_type & |
|
template<class U>
requires std::assignable_from<U&, const char*> |
constexpr auto | operator= (const char *rhs) -> self_type & |
|
template<class L>
requires std::assignable_from<U&, const char*>
template<class U>
requires std::assignable_from<U&, const char*>
Three-way comparison with a C-string.
Special overload for comparing with C-strings, converting the C-string to a string_view for proper lexicographical comparison.
- Template Parameters
-
U | Value type (deduced, must be assignable from const char*) |
- Parameters
-
rhs | C-string to compare with |
- Returns
- Ordering result of lexicographical comparison
- Precondition
- U must be assignable from const char*
-
rhs must be a valid null-terminated C-string
- Postcondition
- Comparison excludes the null terminator
-
Equivalent to comparing with std::string_view(rhs)
Definition at line 479 of file variable_size_binary_reference.hpp.
template<class L>
requires mpl::convertible_ranges<T, typename L::inner_value_type>
template<std::ranges::input_range T>
requires mpl::convertible_ranges<T, typename L::inner_value_type>
template<class L>
template<class U = typename L::inner_value_type>
requires std::assignable_from<U&, const char*>
Assignment from a C-string.
Special overload to handle C-string assignments correctly, avoiding issues with the null terminator being included in the binary data. The C-string is converted to a string_view before assignment.
- Template Parameters
-
U | Value type (deduced, must be assignable from const char*) |
- Parameters
-
rhs | C-string to assign from |
- Returns
- Reference to this object
- Precondition
- U must be assignable from const char*
-
rhs must be a valid null-terminated C-string
-
Layout must remain valid during assignment
- Postcondition
- Underlying element is assigned the string content (without null terminator)
-
Layout buffers are updated appropriately
- Note
- This overload prevents const char* from being treated as a range which would include the null terminator
template<class L>
requires std::assignable_from<U&, const char*>
template<class U>
requires std::assignable_from<U&, const char*>
Equality comparison with a C-string.
Special overload for comparing with C-strings, converting the C-string to a string_view for proper comparison without null terminator issues.
- Template Parameters
-
U | Value type (deduced, must be assignable from const char*) |
- Parameters
-
rhs | C-string to compare with |
- Returns
- true if content matches the C-string, false otherwise
- Precondition
- U must be assignable from const char*
-
rhs must be a valid null-terminated C-string
- Postcondition
- Comparison excludes the null terminator
-
Equivalent to comparing with std::string_view(rhs)
Definition at line 463 of file variable_size_binary_reference.hpp.
template<class L>
requires mpl::convertible_ranges<T, typename L::inner_value_type>
template<std::ranges::input_range T>
requires mpl::convertible_ranges<T, typename L::inner_value_type>