[ox/std] Fix build
All checks were successful
Build / build (push) Successful in 1m17s

This commit is contained in:
2026-01-28 00:45:26 -06:00
parent 5e1698a321
commit 8c4add57e4

View File

@@ -20,13 +20,17 @@ static_assert(ox::strcmp("", "") == 0, "\"\" == \"\"");
static_assert([] { static_assert([] {
auto constexpr testStr = ox::Span{"asdf"}; auto constexpr testStr = ox::Span{"asdf"};
OX_ALLOW_UNSAFE_BUFFERS_BEGIN
return ox::strchr(testStr.data(), 0, 4) == &testStr[4]; return ox::strchr(testStr.data(), 0, 4) == &testStr[4];
OX_ALLOW_UNSAFE_BUFFERS_END
}(), "ox::strchr 0"); }(), "ox::strchr 0");
static_assert([] { static_assert([] {
auto constexpr testStr = "aaaa"; auto constexpr testStr = "aaaa";
// test the const and non-const versions of ox::lastIndexOf // test the const and non-const versions of ox::lastIndexOf
OX_ALLOW_UNSAFE_BUFFERS_BEGIN
return ox::lastIndexOf(testStr, 'a', ox::strlen(testStr)) == 3; return ox::lastIndexOf(testStr, 'a', ox::strlen(testStr)) == 3;
OX_ALLOW_UNSAFE_BUFFERS_END
}(), "ox::lastIndexOf aaaa a"); }(), "ox::lastIndexOf aaaa a");
#ifndef OX_USE_STDLIB #ifndef OX_USE_STDLIB