From 24798ee3365d14b26a0c90b37148549e81b7237b Mon Sep 17 00:00:00 2001 From: Mindaugas Vinkelis Date: Mon, 29 Jul 2024 19:12:09 +0300 Subject: [PATCH] changelog update for 5.2.4 --- .github/workflows/on_linux.yml | 11 +++++------ .github/workflows/on_mac.yml | 4 ++-- .github/workflows/on_windows.yml | 2 +- CHANGELOG.md | 12 ++++++++++++ CMakeLists.txt | 2 +- include/bitsery/adapter/buffer.h | 3 ++- include/bitsery/bitsery.h | 6 ------ tests/CMakeLists.txt | 2 +- tests/brief_syntax.cpp | 23 +++++++++++++++-------- 9 files changed, 39 insertions(+), 26 deletions(-) diff --git a/.github/workflows/on_linux.yml b/.github/workflows/on_linux.yml index 216eedf..f4e9000 100644 --- a/.github/workflows/on_linux.yml +++ b/.github/workflows/on_linux.yml @@ -9,17 +9,17 @@ on: jobs: build: name: ${{ matrix.config.name }} - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: config: - - name: "Ubuntu Latest with GCC 12" + - name: "Ubuntu Latest with GCC 14" compiler: gcc - compiler_ver: 12 - - name: "Ubuntu Latests with Clang 15" + compiler_ver: 14 + - name: "Ubuntu Latests with Clang 18" compiler: clang - compiler_ver: 15 + compiler_ver: 18 steps: - name: Prepare specific Clang version if: ${{ matrix.config.compiler == 'clang' }} @@ -35,7 +35,6 @@ jobs: sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-${{ matrix.config.compiler_ver}} 100 - name: Installing GTest run: | - sudo add-apt-repository ppa:team-xbmc/ppa sudo apt-get update sudo apt-get install libgmock-dev - uses: actions/checkout@v3 diff --git a/.github/workflows/on_mac.yml b/.github/workflows/on_mac.yml index be59fcb..6a28f8b 100644 --- a/.github/workflows/on_mac.yml +++ b/.github/workflows/on_mac.yml @@ -14,9 +14,9 @@ jobs: run: | git clone https://github.com/google/googletest.git cd googletest - git checkout release-1.11.0 + git checkout v1.14.0 cmake -S . -B build - cmake --build build --target install + sudo cmake --build build --target install - uses: actions/checkout@v3 - name: Configure run: cmake -S . -B build -DBITSERY_BUILD_TESTS=ON -DBITSERY_BUILD_EXAMPLES=ON -DCMAKE_CXX_STANDARD=17 diff --git a/.github/workflows/on_windows.yml b/.github/workflows/on_windows.yml index d88185e..6442462 100644 --- a/.github/workflows/on_windows.yml +++ b/.github/workflows/on_windows.yml @@ -15,7 +15,7 @@ jobs: run: | git clone https://github.com/google/googletest.git cd googletest - git checkout release-1.11.0 + git checkout v1.14.0 cmake -S . -B build -Dgtest_force_shared_crt=ON cmake --build build --config Release --target install - uses: actions/checkout@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index bfee9fb..d78df22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# [5.2.4](https://github.com/fraillt/bitsery/compare/v5.2.3...v5.2.4) (2024-07-30) + +### Improvements +* implement brief syntax for std::optional and std::bitset. #116 (thanks to [Destroyerrrocket](https://github.com/Destroyerrrocket)) +* improve performance for buffer adapters. #118 (thanks to [Destroyerrrocket](https://github.com/Destroyerrrocket)) +* check if should swap by taking into account actual type (in addition to configuration). #105 (thanks to [SoftdriveFelix](https://github.com/SoftdriveFelix)) +* fix compile errors for latest compilers. #106 (thanks to [NBurley93](https://github.com/NBurley93)) + +### Other notes +* change cmake_minimum_required to 3.25. +* change compilers for ubuntu (gcc 14 and clang 18). + # [5.2.3](https://github.com/fraillt/bitsery/compare/v5.2.2...v5.2.3) (2022-12-01) ### Improvements diff --git a/CMakeLists.txt b/CMakeLists.txt index 82e917d..bb58961 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.25) project(bitsery LANGUAGES CXX VERSION 5.2.2) diff --git a/include/bitsery/adapter/buffer.h b/include/bitsery/adapter/buffer.h index 47a8678..1e05b23 100644 --- a/include/bitsery/adapter/buffer.h +++ b/include/bitsery/adapter/buffer.h @@ -276,8 +276,9 @@ class OutputBufferAdapter } } - void maybeResize(BITSERY_MAYBE_UNUSED size_t newOffset, std::false_type) + void maybeResize(size_t newOffset, std::false_type) { + static_cast(newOffset); assert(newOffset <= _bufferSize); } diff --git a/include/bitsery/bitsery.h b/include/bitsery/bitsery.h index 378b3ea..b5dee9d 100644 --- a/include/bitsery/bitsery.h +++ b/include/bitsery/bitsery.h @@ -77,12 +77,6 @@ #define BITSERY_UNLIKELY #endif -#if __has_cpp_attribute(maybe_unused) -#define BITSERY_MAYBE_UNUSED BITSERY_ATTRIBUTE(maybe_unused) -#else -#define BITSERY_MAYBE_UNUSED -#endif - #if __GNUC__ #define BITSERY_NOINLINE __attribute__((noinline)) #elif defined(_MSC_VER) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ba15050..732421a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -20,7 +20,7 @@ #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #SOFTWARE. -cmake_minimum_required(VERSION 3.11) +cmake_minimum_required(VERSION 3.25) project(bitsery_tests LANGUAGES CXX) diff --git a/tests/brief_syntax.cpp b/tests/brief_syntax.cpp index a0b61e0..754e43b 100644 --- a/tests/brief_syntax.cpp +++ b/tests/brief_syntax.cpp @@ -23,14 +23,13 @@ #include #include #include -#include #include #include #include #include #include #include -#include + #include #include #include @@ -41,6 +40,10 @@ #if __cplusplus > 201402L #include #include +#include +#if __cplusplus > 202002L +#include +#endif #elif defined(_MSC_VER) #pragma message( \ "C++17 and /Zc:__cplusplus option is required to enable std::tuple and std::variant brief syntax tests") @@ -475,12 +478,6 @@ TEST(BriefSyntax, StdAtomic) 0x1337); } -TEST(BriefSyntax, StdBitset) -{ - std::bitset<17> bits{ 0b10101010101010101 }; - EXPECT_TRUE(procBriefSyntax(bits) == bits); -} - #if __cplusplus > 201402L TEST(BriefSyntax, StdTuple) @@ -504,6 +501,16 @@ TEST(BriefSyntax, StdOptional) EXPECT_TRUE(procBriefSyntax(opt) == opt); } +#if __cplusplus > 202002L + +TEST(BriefSyntax, StdBitset) +{ + std::bitset<17> bits{ 0b10101010101010101 }; + EXPECT_TRUE(procBriefSyntax(bits) == bits); +} + +#endif + #endif TEST(BriefSyntax, NestedTypes)