diff --git a/includes/std/array.pat b/includes/std/array.pat new file mode 100644 index 0000000..3e02cc4 --- /dev/null +++ b/includes/std/array.pat @@ -0,0 +1,9 @@ +#pragma once + +namespace std { + + struct Array { + T data[Size] [[inline]]; + }; + +} \ No newline at end of file diff --git a/includes/std/string.pat b/includes/std/string.pat index d4a9784..62a3e4c 100644 --- a/includes/std/string.pat +++ b/includes/std/string.pat @@ -4,6 +4,22 @@ namespace std::string { + struct SizedStringBase { + SizeType size; + DataType data[size]; + } [[sealed, format("std::string::impl::format_sized_string"), transform("std::string::impl::format_sized_string")]]; + + using SizedString = SizedStringBase; + using SizedString16 = SizedStringBase; + + namespace impl { + + fn format_sized_string(ref auto string) { + return string.data; + }; + + } + fn length(str string) { return builtin::std::string::length(string); };