[#mp_units-basic_fixed_string-08-2constructor-01]
= xref:mp_units.adoc[mp&lowbar;units]::xref:mp_units/basic_fixed_string-08.adoc[basic&lowbar;fixed&lowbar;string]::basic&lowbar;fixed&lowbar;string
:relfileprefix: ../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;mp&hyphen;units&sol;ext&sol;fixed&lowbar;string&period;h&gt;`

Copy constructor


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/basic_fixed_string-08/2constructor-08.adoc[basic&lowbar;fixed&lowbar;string](xref:mp_units/basic_fixed_string-08.adoc[basic&lowbar;fixed&lowbar;string] const& other) noexcept = default;
----

[.small]#xref:mp_units/basic_fixed_string-08/2constructor-08.adoc[_» more&period;&period;&period;_]#

Constructs the string from a null&hyphen;terminated character array literal


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
consteval
explicit(false)
xref:mp_units/basic_fixed_string-08/2constructor-0f.adoc[basic&lowbar;fixed&lowbar;string](CharT const(& txt)[]) noexcept;
----

[.small]#xref:mp_units/basic_fixed_string-08/2constructor-0f.adoc[_» more&period;&period;&period;_]#

Constructs the string from exactly `N` individual characters


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;std::same&lowbar;as&lt;CharT&gt;&period;&period;&period; Chars&gt;
requires (sizeof&period;&period;&period;(Chars) &equals;&equals; N) &amp;&amp; (&period;&period;&period; &amp;&amp; !std&colon;&colon;is&lowbar;pointer&lowbar;v&lt;Chars&gt;)
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
explicit
xref:mp_units/basic_fixed_string-08/2constructor-0b.adoc[basic&lowbar;fixed&lowbar;string](Chars&period;&period;&period; chars) noexcept;
----

[.small]#xref:mp_units/basic_fixed_string-08/2constructor-0b.adoc[_» more&period;&period;&period;_]#

Constructs the string from an input range of exactly `N` characters


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;std::ranges::input&lowbar;range R&gt;
requires std&colon;&colon;same&lowbar;as&lt;std&colon;&colon;ranges&colon;&colon;range&lowbar;value&lowbar;t&lt;R&gt;, CharT&gt;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/basic_fixed_string-08/2constructor-0c.adoc[basic&lowbar;fixed&lowbar;string](
    std::from&lowbar;range&lowbar;t from&lowbar;range&lowbar;tag,
    R&& r);
----

[.small]#xref:mp_units/basic_fixed_string-08/2constructor-0c.adoc[_» more&period;&period;&period;_]#

Constructs the string from a range of exactly `N` characters given by an iterator&sol;sentinel pair


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    std::input&lowbar;iterator It,
    std::sentinel&lowbar;for&lt;It&gt; S&gt;
requires std&colon;&colon;same&lowbar;as&lt;std&colon;&colon;iter&lowbar;value&lowbar;t&lt;It&gt;, CharT&gt;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/basic_fixed_string-08/2constructor-0e.adoc[basic&lowbar;fixed&lowbar;string](
    It begin,
    S end);
----

[.small]#xref:mp_units/basic_fixed_string-08/2constructor-0e.adoc[_» more&period;&period;&period;_]#

== Return Value

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====
== Parameters

[cols="1,4"]
|===
| Name| Description
| *other*
| The string to copy from
| *txt*
| The character array literal to copy from&semi; must be null&hyphen;terminated at index `N`
| *chars*
| The characters to store, in order
| *from&lowbar;range&lowbar;tag*
| Tag disambiguating this overload as taking a range
| *r*
| The range of characters to copy from
| *begin*
| Iterator to the first character
| *end*
| Sentinel marking the end of the character sequence
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
