diff --git a/3rdparty/fmtlib-src b/3rdparty/fmtlib-src new file mode 160000 index 0000000..a337011 --- /dev/null +++ b/3rdparty/fmtlib-src @@ -0,0 +1 @@ +Subproject commit a33701196adfad74917046096bf5a2aa0ab0bb50 diff --git a/3rdparty/googlebenchmark-src b/3rdparty/googlebenchmark-src new file mode 160000 index 0000000..361e8d1 --- /dev/null +++ b/3rdparty/googlebenchmark-src @@ -0,0 +1 @@ +Subproject commit 361e8d1cfe0c6c36d30b39f1b61302ece5507320 diff --git a/3rdparty/googletest-src b/3rdparty/googletest-src new file mode 160000 index 0000000..1546095 --- /dev/null +++ b/3rdparty/googletest-src @@ -0,0 +1 @@ +Subproject commit 15460959cbbfa20e66ef0b5ab497367e47fc0a04 diff --git a/include/libimp/result.h b/include/libimp/result.h index 5ab78a7..f733556 100644 --- a/include/libimp/result.h +++ b/include/libimp/result.h @@ -132,8 +132,6 @@ class result : public TypeTraits { public: using type_traits_t = TypeTraits; - result() noexcept = default; - template , typename = decltype(type_traits_t::init_code(std::declval() diff --git a/src/libimp/fmt.cpp b/src/libimp/fmt.cpp index 39c34f2..3eae1ed 100644 --- a/src/libimp/fmt.cpp +++ b/src/libimp/fmt.cpp @@ -7,6 +7,7 @@ #include // std::memcpy #include // std::min #include +#include #include "libimp/codecvt.h" @@ -116,16 +117,16 @@ span fmt_of_float(span fstr, span const &l) { template int sprintf(fmt_context &ctx, span const &sfmt, A a) { - for (int sz = -1;;) { + for (std::int32_t sz = -1;;) { auto sbuf = ctx.buffer(sz + 1); - if (sbuf.size() < (sz + 1)) { + if (sbuf.size() < std::size_t(sz + 1)) { return -1; } sz = std::snprintf(sbuf.data(), sbuf.size(), sfmt.data(), a); if (sz <= 0) { return sz; } - if (sz < sbuf.size()) { + if (std::size_t(sz) < sbuf.size()) { ctx.expend(sz); return sz; } diff --git a/test/imp/test_imp_span.cpp b/test/imp/test_imp_span.cpp index 630bca2..0304f7e 100644 --- a/test/imp/test_imp_span.cpp +++ b/test/imp/test_imp_span.cpp @@ -20,7 +20,7 @@ TEST(span, span) { auto test_proc = [](auto &&buf, auto &&sp) { EXPECT_EQ(imp::countof(buf), sp.size()); EXPECT_EQ(sizeof(buf[0]) * imp::countof(buf), sp.size_bytes()); - for (int i = 0; i < sp.size(); ++i) { + for (std::size_t i = 0; i < sp.size(); ++i) { EXPECT_EQ(buf[i], sp[i]); } };