mirror of
https://github.com/Ed94/metadesk.git
synced 2026-10-14 04:49:42 -07:00
c++ build test, add user-defined-literals for metadesk strings
This commit is contained in:
1 parent
2144f62e7e
commit
c3c863c7fa
1 file changed
+8
-1
@@ -1,9 +1,16 @@
|
||||
#include "md.h"
|
||||
#include "md.c"
|
||||
|
||||
MD_String8 operator "" _md(const char *s, size_t size)
|
||||
{
|
||||
MD_String8 str = MD_S8((MD_u8 *)s, (MD_u64)size);
|
||||
return str;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
||||
MD_String8 str = "foobar"_md;
|
||||
printf("%.*s", MD_StringExpand(str));
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user