Skip to main content

Constructors

1#
constexpr basic_fixed_string() noexcept;
2#
constexpr basic_fixed_string(const value_type (&array)[N + 1]) noexcept;
  1. Default constructor. Initializes the whole string with zeros.
  2. Constructs a basic_fixed_string from a const char array.

Parameters#

  • array - reference to an array of characters to use as source to initialize the fixed string with

Complexity#

1-2. Linear in N

Example#

#include <fixed_string.hpp>#include <iostream>
int main(){    fixstr::fixed_string str = "Hello, World!";    std::cout << str;}
Output:
Hello, World!