Skip to content

Commit c0ed932

Browse files
authored
fix aarch64 build errors (#749)
1 parent 3beec34 commit c0ed932

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/aarch64.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ jobs:
3434
distro: ubuntu22.04
3535
install: |
3636
apt-get update -q -y
37-
apt-get install -y cmake make g++ ninja-build git
37+
apt-get install -y cmake make g++-12 ninja-build git gcc-12
38+
ln -s -f /usr/bin/gcc-12 /usr/bin/gcc
39+
ln -s -f /usr/bin/g++-12 /usr/bin/g++
3840
run: |
3941
cmake -DCMAKE_CXX_STANDARD=20 -B build
4042
cmake --build build

include/ada/helpers.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ bool overlaps(std::string_view input1, const std::string& input2) noexcept;
102102
* Return the substring from input going from index pos1 to the pos2 (non
103103
* included). The length of the substring is pos2 - pos1.
104104
*/
105-
ada_really_inline constexpr std::string_view substring(const std::string& input,
105+
ada_really_inline constexpr std::string_view substring(std::string_view input,
106106
size_t pos1,
107107
size_t pos2) noexcept {
108108
#if ADA_DEVELOPMENT_CHECKS
@@ -112,7 +112,7 @@ ada_really_inline constexpr std::string_view substring(const std::string& input,
112112
abort();
113113
}
114114
#endif
115-
return std::string_view(input.data() + pos1, pos2 - pos1);
115+
return input.substr(pos1, pos2 - pos1);
116116
}
117117

118118
/**

0 commit comments

Comments
 (0)