-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* made Abseil & Boost optional * minor warning fixes in svector * Updated unit tests so it compiles with strict warnings * Bump version to 1.0.3
- Loading branch information
Showing
23 changed files
with
171 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,28 +8,27 @@ jobs: | |
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-python@v1 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
- run: ./scripts/lint/lint-all.py | ||
|
||
linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: install dependencies boost | ||
run: sudo apt-get install -yq libboost-dev | ||
- uses: actions/checkout@v3 | ||
- run: sudo apt-get install -yq libboost-dev | ||
- uses: hendrikmuhs/[email protected] | ||
- uses: actions/setup-python@v1 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
- run: pip install meson ninja | ||
- run: meson setup builddir/ | ||
env: | ||
CXX: ccache c++ | ||
- run: meson test -C builddir/ -v | ||
- uses: actions/upload-artifact@v1 | ||
- uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: Linux_Meson_Testlog | ||
|
@@ -38,17 +37,38 @@ jobs: | |
macos: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-python@v1 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
- run: brew install gcc boost ccache meson ninja | ||
- run: meson setup builddir/ | ||
env: | ||
CXX: ccache c++ | ||
- run: meson test -C builddir/ -v | ||
- uses: actions/upload-artifact@v1 | ||
- uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: MacOS_Meson_Testlog | ||
path: builddir/meson-logs/testlog.txt | ||
|
||
windows: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
- uses: BSFishy/pip-action@v1 | ||
with: | ||
packages: ninja meson | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
- run: meson setup builddir | ||
- run: meson test -C builddir -v | ||
- uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: Windows_Meson_Testlog | ||
path: | | ||
builddir/meson-logs/testlog.txt | ||
builddir/test/test-svector.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
// ┌─┐┬ ┬┌─┐┌─┐┌┬┐┌─┐┬─┐ Compact SVO optimized vector C++17 or higher | ||
// └─┐└┐┌┘├┤ │ │ │ │├┬┘ Version 1.0.2 | ||
// └─┐└┐┌┘├┤ │ │ │ │├┬┘ Version 1.0.3 | ||
// └─┘ └┘ └─┘└─┘ ┴ └─┘┴└─ https://github.com/martinus/svector | ||
// | ||
// Licensed under the MIT License <http://opensource.org/licenses/MIT>. | ||
// SPDX-License-Identifier: MIT | ||
// Copyright (c) 2022 Martin Leitner-Ankerl <[email protected]> | ||
// Copyright (c) 2022-2023 Martin Leitner-Ankerl <[email protected]> | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -30,7 +30,7 @@ | |
// see https://semver.org/spec/v2.0.0.html | ||
#define ANKERL_SVECTOR_VERSION_MAJOR 1 // incompatible API changes | ||
#define ANKERL_SVECTOR_VERSION_MINOR 0 // add functionality in a backwards compatible manner | ||
#define ANKERL_SVECTOR_VERSION_PATCH 2 // backwards compatible bug fixes | ||
#define ANKERL_SVECTOR_VERSION_PATCH 3 // backwards compatible bug fixes | ||
|
||
// API versioning with inline namespace, see https://www.foonathan.net/2018/11/inline-namespaces/ | ||
#define ANKERL_SVECTOR_VERSION_CONCAT1(major, minor, patch) v##major##_##minor##_##patch | ||
|
@@ -211,7 +211,7 @@ class svector { | |
|
||
// sets size of direct mode and mode to direct too. | ||
constexpr void set_direct_and_size(size_t s) { | ||
m_data[0] = (s << 1U) | 1U; | ||
m_data[0] = static_cast<uint8_t>((s << 1U) | 1U); | ||
} | ||
|
||
[[nodiscard]] auto direct_data() -> T* { | ||
|
@@ -285,9 +285,9 @@ class svector { | |
// indirect -> indirect | ||
uninitialized_move_and_destroy(data<direction::indirect>(), storage->data(), size<direction::indirect>()); | ||
storage->size(size<direction::indirect>()); | ||
auto* storage = indirect(); | ||
std::destroy_at(storage); | ||
::operator delete(storage); | ||
auto* storage_direct = indirect(); | ||
std::destroy_at(storage_direct); | ||
::operator delete(storage_direct); | ||
} | ||
set_indirect(storage); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
[wrap-file] | ||
directory = abseil-cpp-20211102.0 | ||
source_url = https://github.com/abseil/abseil-cpp/archive/20211102.0.tar.gz | ||
source_filename = abseil-cpp-20211102.0.tar.gz | ||
source_hash = dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4 | ||
patch_filename = abseil-cpp_20211102.0-3_patch.zip | ||
patch_url = https://wrapdb.mesonbuild.com/v2/abseil-cpp_20211102.0-3/get_patch | ||
patch_hash = 3b49ff46df64414bac034b58bf36a07457375b6f8d8b5158e341157c6f9efad2 | ||
directory = abseil-cpp-20230125.1 | ||
source_url = https://github.com/abseil/abseil-cpp/archive/20230125.1.tar.gz | ||
source_filename = abseil-cpp-20230125.1.tar.gz | ||
source_hash = 81311c17599b3712069ded20cca09a62ab0bf2a89dfa16993786c8782b7ed145 | ||
patch_filename = abseil-cpp_20230125.1-1_patch.zip | ||
patch_url = https://wrapdb.mesonbuild.com/v2/abseil-cpp_20230125.1-1/get_patch | ||
patch_hash = a920ab28067e433d7ead2d564a4f511628f498f0723f7f94d19317877787ef39 | ||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/abseil-cpp_20230125.1-1/abseil-cpp-20230125.1.tar.gz | ||
wrapdb_version = 20230125.1-1 | ||
|
||
[provide] | ||
absl_base = absl_base_dep | ||
absl_container = absl_container_dep | ||
absl_debugging = absl_debugging_dep | ||
absl_log = absl_log_dep | ||
absl_flags = absl_flags_dep | ||
absl_hash = absl_hash_dep | ||
absl_crc = absl_crc_dep | ||
absl_numeric = absl_numeric_dep | ||
absl_random = absl_random_dep | ||
absl_status = absl_status_dep | ||
absl_strings = absl_strings_dep | ||
absl_synchronization = absl_synchronization_dep | ||
absl_time = absl_time_dep | ||
absl_types = absl_types_dep | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
[wrap-file] | ||
directory = doctest-2.4.8 | ||
source_url = https://github.com/doctest/doctest/archive/refs/tags/v2.4.8.tar.gz | ||
source_filename = doctest-2.4.8.tar.gz | ||
source_hash = f52763630aa17bd9772b54e14b6cdd632c87adf0169455a86a49bd94abf2cd83 | ||
directory = doctest-2.4.9 | ||
source_url = https://github.com/doctest/doctest/archive/refs/tags/v2.4.9.tar.gz | ||
source_filename = doctest-2.4.9.tar.gz | ||
source_hash = 19b2df757f2f3703a5e63cee553d85596875f06d91a3333acd80a969ef210856 | ||
wrapdb_version = 2.4.9-1 | ||
|
||
[provide] | ||
dependency_names = doctest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
[wrap-file] | ||
directory = fmt-8.1.1 | ||
source_url = https://github.com/fmtlib/fmt/archive/8.1.1.tar.gz | ||
source_filename = fmt-8.1.1.tar.gz | ||
source_hash = 3d794d3cf67633b34b2771eb9f073bde87e846e0d395d254df7b211ef1ec7346 | ||
patch_filename = fmt_8.1.1-1_patch.zip | ||
patch_url = https://wrapdb.mesonbuild.com/v2/fmt_8.1.1-1/get_patch | ||
patch_hash = 6035a67c7a8c90bed74c293c7265c769f47a69816125f7566bccb8e2543cee5e | ||
directory = fmt-9.1.0 | ||
source_url = https://github.com/fmtlib/fmt/archive/9.1.0.tar.gz | ||
source_filename = fmt-9.1.0.tar.gz | ||
source_hash = 5dea48d1fcddc3ec571ce2058e13910a0d4a6bab4cc09a809d8b1dd1c88ae6f2 | ||
patch_filename = fmt_9.1.0-1_patch.zip | ||
patch_url = https://wrapdb.mesonbuild.com/v2/fmt_9.1.0-1/get_patch | ||
patch_hash = 4557b9ba87b3eb63694ed9b21d1a2117d4a97ca56b91085b10288e9a5294adf8 | ||
wrapdb_version = 9.1.0-1 | ||
|
||
[provide] | ||
fmt = fmt_dep | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#pragma once | ||
|
||
#if __has_include(<absl/container/inlined_vector.h>) | ||
# define ANKERL_SVECTOR_HAS_ABSL() 1 | ||
# include <absl/container/inlined_vector.h> | ||
#else | ||
# define ANKERL_SVECTOR_HAS_ABSL() 0 | ||
#endif | ||
|
||
#if __has_include(<boost/container/small_vector.hpp>) | ||
# define ANKERL_SVECTOR_HAS_BOOST() 1 | ||
# include <boost/container/small_vector.hpp> | ||
#else | ||
# define ANKERL_SVECTOR_HAS_BOOST() 0 | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.