Reintroduce C++ support and add usage tests for C++ (#4)

Reviewed-on: #4
Co-authored-by: Abdelrahman <said.abdelrahman89@gmail.com>
Co-committed-by: Abdelrahman <said.abdelrahman89@gmail.com>
This commit is contained in:
2025-08-10 22:33:40 +00:00
committed by Abdelrahman Said
parent 011083ab83
commit d3fccd61b5
42 changed files with 2499 additions and 104 deletions

View File

@@ -0,0 +1,4 @@
(ARRAY_PTR != NULL && (ARRAY_PTR)->count > 0 ? \
*_{Tlower}_array_pop(ARRAY_PTR) : \
{T}{{}} \
)

View File

@@ -0,0 +1,9 @@
([&]() {{ \
persistent {T} buf[wapp_misc_utils_u64_round_up_pow2(wapp_misc_utils_va_args_count({T}, __VA_ARGS__) * 2)] = {{__VA_ARGS__}}; \
return {ArrayType}{{ \
buf, \
wapp_misc_utils_va_args_count({T}, __VA_ARGS__), \
wapp_misc_utils_u64_round_up_pow2(wapp_misc_utils_va_args_count({T}, __VA_ARGS__) * 2), \
sizeof({T}) \
}}; \
}}())

View File

@@ -0,0 +1,4 @@
([&]() {{ \
persistent {T} buf[CAPACITY] = {{}}; \
return {ArrayType}{{buf, 0, CAPACITY, sizeof({T})}}; \
}}())