Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 21 additions & 10 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ env:
DEBIAN_FRONTEND: noninteractive
CMAKE_GENERATOR: Ninja
DEFAULT_CXX_STANDARD: 20
DEFAULT_LLVM_VERSION: 19
DEFAULT_LLVM_VERSION: 20
DEFAULT_GCC_VERSION: 13
MULL_LLVM_VERSION: 17
MULL_LLVM_VERSION: 18
MULL_VERSION: 0.24.0
HYPOTHESIS_PROFILE: default

concurrency:
Expand All @@ -29,7 +30,7 @@ jobs:
fail-fast: false
matrix:
compiler: [clang, gcc]
version: [12, 13, 16, 17, 18, 19]
version: [12, 13, 16, 17, 18, 19, 20]
cxx_standard: [17, 20]
stdlib: [libstdc++, libc++]
build_type: [Debug]
Expand All @@ -38,6 +39,15 @@ jobs:
cc: "clang"
cxx: "clang++"
cxx_flags: "-stdlib=libstdc++"
- version: 20
compiler: clang
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 20
toolchain_root: "/usr/lib/llvm-20"
- version: 20
compiler: clang
stdlib: libc++
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 20 && sudo apt install -y libc++-20-dev libc++abi-20-dev
cxx_flags: "-stdlib=libc++"
- version: 19
compiler: clang
install: sudo apt update && sudo apt install -y clang-19
Expand Down Expand Up @@ -89,6 +99,8 @@ jobs:
cxx: "g++-12"
cxx_flags: ""
exclude:
- compiler: gcc
version: 20
- compiler: gcc
version: 19
- compiler: gcc
Expand Down Expand Up @@ -255,7 +267,8 @@ jobs:

- name: Install build tools
run: |
sudo apt update && sudo apt install -y pipx ninja-build clang-tidy-${{env.DEFAULT_LLVM_VERSION}} clang-format-${{env.DEFAULT_LLVM_VERSION}}
wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh ${{env.DEFAULT_LLVM_VERSION}}
sudo apt install -y pipx ninja-build clang-tidy-${{env.DEFAULT_LLVM_VERSION}} clang-format-${{env.DEFAULT_LLVM_VERSION}}

- name: Install cmake-format
run: |
Expand Down Expand Up @@ -304,8 +317,8 @@ jobs:
- compiler: clang
cc: "clang"
cxx: "clang++"
install: sudo apt update && sudo apt install -y clang-19
toolchain_root: "/usr/lib/llvm-19"
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 20
toolchain_root: "/usr/lib/llvm-20"
- compiler: gcc
cc: "gcc-13"
cxx: "g++-13"
Expand Down Expand Up @@ -452,11 +465,9 @@ jobs:
sudo apt update && sudo apt install -y clang-${{env.MULL_LLVM_VERSION}} ninja-build python3-venv python3-pip

- name: Install mull
env:
MULL_VERSION: 0.23.0
run: |
wget https://github.com/mull-project/mull/releases/download/${{env.MULL_VERSION}}/Mull-${{env.MULL_LLVM_VERSION}}-${{env.MULL_VERSION}}-LLVM-${{env.MULL_LLVM_VERSION}}.0-ubuntu-24.04.deb
sudo dpkg -i Mull-${{env.MULL_LLVM_VERSION}}-${{env.MULL_VERSION}}-LLVM-${{env.MULL_LLVM_VERSION}}.0-ubuntu-24.04.deb
wget https://github.com/mull-project/mull/releases/download/${{env.MULL_VERSION}}/Mull-${{env.MULL_LLVM_VERSION}}-${{env.MULL_VERSION}}-LLVM-${{env.MULL_LLVM_VERSION}}.1-ubuntu-24.04.deb
sudo dpkg -i Mull-${{env.MULL_LLVM_VERSION}}-${{env.MULL_VERSION}}-LLVM-${{env.MULL_LLVM_VERSION}}.1-ubuntu-24.04.deb

- name: Restore CPM cache
env:
Expand Down
2 changes: 1 addition & 1 deletion include/stdx/atomic_bitset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class atomic_bitset {
return atomic::load(storage, order) & mask;
}

[[nodiscard]] static constexpr auto value_from_string(std::string_view str,
[[nodiscard]] constexpr static auto value_from_string(std::string_view str,
std::size_t pos,
std::size_t n,
char one) -> elem_t {
Expand Down
18 changes: 9 additions & 9 deletions include/stdx/byterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ template <typename T> class byterator {
using byte_t = std::remove_reference_t<forward_like_t<T, std::byte>>;
byte_t *ptr;

[[nodiscard]] constexpr friend auto operator==(byterator const &x,
[[nodiscard]] friend constexpr auto operator==(byterator const &x,
byterator const &y) -> bool {
return x.ptr == y.ptr;
}

template <typename It,
std::enable_if_t<std::is_same_v<detail::iterator_value_t<It>, T>,
int> = 0>
[[nodiscard]] constexpr friend auto operator==(byterator const &x, It y)
[[nodiscard]] friend constexpr auto operator==(byterator const &x, It y)
-> bool {
return static_cast<void const *>(x.ptr) ==
static_cast<void const *>(stdx::to_address(y));
Expand All @@ -60,34 +60,34 @@ template <typename T> class byterator {
}

template <typename It>
[[nodiscard]] constexpr friend auto operator==(It y, byterator const &x)
[[nodiscard]] friend constexpr auto operator==(It y, byterator const &x)
-> bool {
return x == y;
}
template <typename It>
[[nodiscard]] constexpr friend auto operator!=(byterator const &x, It y)
[[nodiscard]] friend constexpr auto operator!=(byterator const &x, It y)
-> bool {
return not(x == y);
}
template <typename It>
[[nodiscard]] constexpr friend auto operator!=(It y, byterator const &x)
[[nodiscard]] friend constexpr auto operator!=(It y, byterator const &x)
-> bool {
return not(x == y);
}

[[nodiscard]] constexpr friend auto operator<(byterator const &x,
[[nodiscard]] friend constexpr auto operator<(byterator const &x,
byterator const &y) -> bool {
return std::less{}(x.ptr, y.ptr);
}
[[nodiscard]] constexpr friend auto operator<=(byterator const &x,
[[nodiscard]] friend constexpr auto operator<=(byterator const &x,
byterator const &y) -> bool {
return std::less_equal{}(x.ptr, y.ptr);
}
[[nodiscard]] constexpr friend auto operator>(byterator const &x,
[[nodiscard]] friend constexpr auto operator>(byterator const &x,
byterator const &y) -> bool {
return std::greater{}(x.ptr, y.ptr);
}
[[nodiscard]] constexpr friend auto operator>=(byterator const &x,
[[nodiscard]] friend constexpr auto operator>=(byterator const &x,
byterator const &y) -> bool {
return std::greater_equal{}(x.ptr, y.ptr);
}
Expand Down
16 changes: 8 additions & 8 deletions include/stdx/rollover.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ template <typename T> struct rollover_t {
}

private:
[[nodiscard]] constexpr friend auto operator==(rollover_t lhs,
[[nodiscard]] friend constexpr auto operator==(rollover_t lhs,
rollover_t rhs) -> bool {
return lhs.value == rhs.value;
}
[[nodiscard]] constexpr friend auto operator!=(rollover_t lhs,
[[nodiscard]] friend constexpr auto operator!=(rollover_t lhs,
rollover_t rhs) -> bool {
return not(lhs == rhs);
}
Expand All @@ -80,37 +80,37 @@ template <typename T> struct rollover_t {
friend constexpr auto operator>(rollover_t, rollover_t) -> bool = delete;
friend constexpr auto operator>=(rollover_t, rollover_t) -> bool = delete;

[[nodiscard]] constexpr friend auto cmp_less(rollover_t lhs, rollover_t rhs)
[[nodiscard]] friend constexpr auto cmp_less(rollover_t lhs, rollover_t rhs)
-> bool {
constexpr auto mid = static_cast<underlying_t>(~underlying_t{}) / 2;
return static_cast<underlying_t>(lhs.value - rhs.value) > mid;
}

[[nodiscard]] constexpr friend auto operator+(rollover_t lhs,
[[nodiscard]] friend constexpr auto operator+(rollover_t lhs,
rollover_t rhs)
-> rollover_t {
lhs += rhs;
return lhs;
}
[[nodiscard]] constexpr friend auto operator-(rollover_t lhs,
[[nodiscard]] friend constexpr auto operator-(rollover_t lhs,
rollover_t rhs)
-> rollover_t {
lhs -= rhs;
return lhs;
}
[[nodiscard]] constexpr friend auto operator*(rollover_t lhs,
[[nodiscard]] friend constexpr auto operator*(rollover_t lhs,
rollover_t rhs)
-> rollover_t {
lhs *= rhs;
return lhs;
}
[[nodiscard]] constexpr friend auto operator/(rollover_t lhs,
[[nodiscard]] friend constexpr auto operator/(rollover_t lhs,
rollover_t rhs)
-> rollover_t {
lhs /= rhs;
return lhs;
}
[[nodiscard]] constexpr friend auto operator%(rollover_t lhs,
[[nodiscard]] friend constexpr auto operator%(rollover_t lhs,
rollover_t rhs)
-> rollover_t {
lhs %= rhs;
Expand Down