diff --git a/.github/workflows/aarch64.yml b/.github/workflows/aarch64.yml index 5aed54916..023e2888f 100644 --- a/.github/workflows/aarch64.yml +++ b/.github/workflows/aarch64.yml @@ -34,7 +34,9 @@ jobs: distro: ubuntu22.04 install: | apt-get update -q -y - apt-get install -y cmake make g++ ninja-build git + apt-get install -y cmake make g++-12 ninja-build git gcc-12 + ln -s -f /usr/bin/gcc-12 /usr/bin/gcc + ln -s -f /usr/bin/g++-12 /usr/bin/g++ run: | cmake -DCMAKE_CXX_STANDARD=20 -B build cmake --build build diff --git a/include/ada/helpers.h b/include/ada/helpers.h index 91077e940..b9a553c02 100644 --- a/include/ada/helpers.h +++ b/include/ada/helpers.h @@ -102,7 +102,7 @@ bool overlaps(std::string_view input1, const std::string& input2) noexcept; * Return the substring from input going from index pos1 to the pos2 (non * included). The length of the substring is pos2 - pos1. */ -ada_really_inline constexpr std::string_view substring(const std::string& input, +ada_really_inline constexpr std::string_view substring(std::string_view input, size_t pos1, size_t pos2) noexcept { #if ADA_DEVELOPMENT_CHECKS @@ -112,7 +112,7 @@ ada_really_inline constexpr std::string_view substring(const std::string& input, abort(); } #endif - return std::string_view(input.data() + pos1, pos2 - pos1); + return input.substr(pos1, pos2 - pos1); } /**