diff --git a/source/core/files.cpp b/source/core/files.cpp index c014fec..e71ab67 100644 --- a/source/core/files.cpp +++ b/source/core/files.cpp @@ -21,6 +21,12 @@ export namespace core { this->buffer[max] = max; } + template constexpr path(char const(&text)[text_size]) { + static_assert(text_size <= max, "path cannot be longer than maximum length"); + copy(this->buffer, text.as_bytes()); + zero(slice{this->buffer}.sliced(text_size, max - text_size)); + } + /** * Returns the base pointer of the path name. */