Compare commits

..

2 Commits

Author SHA1 Message Date
815c3d19bf [ox/std] Make StringLiteral constructors non-explicit
All checks were successful
Build / build (push) Successful in 1m8s
2026-01-19 21:00:58 -06:00
522bb14f18 [ox/std] Fix intToStr to have room for negatives 2026-01-19 21:00:12 -06:00
2 changed files with 7 additions and 7 deletions

View File

@@ -250,16 +250,16 @@ constexpr auto intToStr(Integer v) noexcept {
auto out = 0;
switch (sizeof(Integer)) {
case 1:
out = 3;
out = 4;
break;
case 2:
out = 5;
out = 6;
break;
case 4:
out = 10;
out = 11;
break;
case 8:
out = 21;
out = 22;
break;
}
return out + ox::is_signed_v<Integer>;

View File

@@ -23,12 +23,12 @@ class StringLiteral: public detail::BaseStringView {
constexpr StringLiteral(StringLiteral const &sv) noexcept = default;
consteval explicit StringLiteral(std::nullptr_t) noexcept {}
consteval StringLiteral(std::nullptr_t) noexcept {}
consteval explicit StringLiteral(char const *str, std::size_t const len) noexcept: BaseStringView{str, len} {}
consteval StringLiteral(char const *str, std::size_t const len) noexcept: BaseStringView{str, len} {}
OX_ALLOW_UNSAFE_BUFFERS_BEGIN
consteval explicit StringLiteral(char const *str) noexcept: StringLiteral{str, ox::strlen(str)} {}
consteval StringLiteral(char const *str) noexcept: StringLiteral{str, ox::strlen(str)} {}
OX_ALLOW_UNSAFE_BUFFERS_END
constexpr StringLiteral &operator=(StringLiteral const &other) noexcept {