From ec8abc262114e551fd9337727fd4cc0d234c5209 Mon Sep 17 00:00:00 2001 From: Ash Vardanian <1983160+ashvardanian@users.noreply.github.com> Date: Tue, 20 Feb 2024 23:30:27 +0000 Subject: [PATCH] Fix: Missing STL-compat imports --- include/stringzilla/stringzilla.hpp | 3 +++ scripts/test.cpp | 28 +++++++++++++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/include/stringzilla/stringzilla.hpp b/include/stringzilla/stringzilla.hpp index 9ef0bec9..0c8e1bd1 100644 --- a/include/stringzilla/stringzilla.hpp +++ b/include/stringzilla/stringzilla.hpp @@ -45,8 +45,10 @@ #endif #if !SZ_AVOID_STL +#include #include #include +#include #if SZ_DETECT_CPP_17 && __cpp_lib_string_view #include #endif @@ -54,6 +56,7 @@ #include // `assert` #include // `std::size_t` +#include // `std::int8_t` #include // `std::basic_ostream` #include // `std::out_of_range` #include // `std::swap` diff --git a/scripts/test.cpp b/scripts/test.cpp index bd831d9a..87bec5dc 100644 --- a/scripts/test.cpp +++ b/scripts/test.cpp @@ -1,6 +1,19 @@ #undef NDEBUG // Enable all assertions #include // assertions +// Overload the following with caution. +// Those parameters must never be explicitly set during releases, +// but they come handy during development, if you want to validate +// different ISA-specific implementations. +// #define SZ_USE_X86_AVX2 0 +// #define SZ_USE_X86_AVX512 0 +// #define SZ_USE_ARM_NEON 0 +// #define SZ_USE_ARM_SVE 0 +#define SZ_DEBUG 1 // Enforce aggressive logging for this unit. + +// Put this at the top to make sure it pulls all the right dependencies +#include + #if defined(__SANITIZE_ADDRESS__) #include // ASAN #endif @@ -14,19 +27,8 @@ #include // `std::ostringstream` #include // `std::vector` -// Overload the following with caution. -// Those parameters must never be explicitly set during releases, -// but they come handy during development, if you want to validate -// different ISA-specific implementations. -// #define SZ_USE_X86_AVX2 0 -// #define SZ_USE_X86_AVX512 0 -// #define SZ_USE_ARM_NEON 0 -// #define SZ_USE_ARM_SVE 0 -#define SZ_DEBUG 1 // Enforce aggressive logging for this unit. - -#include // Baseline -#include // Baseline -#include // Contender +#include // Baseline +#include // Baseline #if !SZ_DETECT_CPP_11 #error "This test requires C++11 or later."