template <std::size_t N>
optica::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::size_t U>
auto operator==(const FixedString<U>& other) const →  bool constexpr noexcept
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::string_view

template <std::size_t N>
template <std::size_t U>
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