MCPcopy Create free account
hub / github.com/a2flo/floor / make_array

Method make_array

include/floor/constexpr/const_string.hpp:203–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201protected:
202 //! creates a storage_array from a c string
203 template <size_t n> static constexpr storage_array<n> make_array(const char (&str)[n]) {
204 storage_array<n> ret {};
205 for(size_t i = 0; i < n; ++i) {
206 ret.data[i] = str[i];
207 }
208 return ret;
209 }
210
211 //! creates a storage array from two c strings
212 //! (note that len_0 should have been subtracted by 1 beforehand, so that the \0 of the first string isn't copied)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected