MCPcopy Create free account
hub / github.com/SheafificationOfG/based-cpp / StringLiteral

Method StringLiteral

gil/gil.impl.hpp:335–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333template <unsigned n> struct StringLiteral {
334 char str[n + 1];
335 constexpr StringLiteral(char const *ptr) noexcept {
336 for (unsigned i = 0; i < n; ++i)
337 str[i] = ptr[i];
338 str[n] = '\0';
339 }
340 static constexpr unsigned size = n;
341
342 constexpr auto operator[](unsigned idx) const noexcept { return str[idx]; }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected