template <std:: size_t N>
FixedString struct
Compiletime friendly fixed size string used as NTTP.
Template parameters | |
---|---|
N | String size + 1 |
Constructors, destructors, conversion operators
- FixedString(const char(&str)[N]) constexpr noexcept
- Constructs fixed size string.
- operator std::string_view() const constexpr noexcept
- Converts fixed size string to string_view.
Public functions
-
template <std::auto operator==(const FixedString<U>& other) const → bool constexpr noexcept
size_t U> - Checks if 2 strings are equal.
Public variables
- char value
- storage for symbols
Function documentation
template <std:: size_t N>
optica::FixedString::FixedString(const char(&str)[N]) constexpr noexcept
Constructs fixed size string.
Parameters | |
---|---|
str | Actual string as string literal |
template <std:: size_t N>
optica::FixedString::operator std::string_view() const constexpr noexcept
Converts fixed size string to string_view.
Returns | std:: |
---|
bool optica::FixedString::operator==(const FixedString<U>& other) const constexpr noexcept
Checks if 2 strings are equal.
Parameters | |
---|---|
other | Other string may be with different size |
Returns | bool |