Skip to main content

fixstr::basic_fixed_string::operator=

1#
constexpr basic_fixed_string& operator=(const value_type (&array)[N + 1]) noexcept;

Replaces the contents with a copy of array.

Parameters#

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

Complexity#

Linear in N

Example#

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