Skip to content

Commit 4b1d235

Browse files
authored
Merge pull request #776 from ckormanyos/update_wide_decimal
Update wide decimal
2 parents e3ce096 + 3d5bc08 commit 4b1d235

6 files changed

Lines changed: 30 additions & 23 deletions

File tree

‎.github/workflows/real-time-cpp-benchmarks.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ jobs:
8989
fetch-depth: '0'
9090
- name: update-tools
9191
run: |
92-
wget --no-check-certificate https://github.com/ckormanyos/avr-gcc-build/releases/download/v15.2.0/gcc-15.2.0-avr.tar.gz
93-
tar -xzf gcc-15.2.0-avr.tar.gz -C ${{ runner.workspace }}
92+
wget --no-check-certificate https://github.com/ckormanyos/avr-gcc-build/releases/download/v16.2.0/gcc-16.2.0-avr.tar.gz
93+
tar -xzf gcc-16.2.0-avr.tar.gz -C ${{ runner.workspace }}
9494
- name: benchmark_builds-avr
9595
run: |
9696
echo
9797
echo 'Add avr-g++ path'
9898
echo
99-
PATH="${{ runner.workspace }}/gcc-15.2.0-avr/bin:$PATH"
99+
PATH="${{ runner.workspace }}/gcc-16.2.0-avr/bin:$PATH"
100100
echo 'Query avr-g++ version'
101101
echo
102102
avr-g++ -v

‎ref_app/src/math/wide_integer/uintwide_t.h‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@
3232
#include <__msvc_int128.hpp>
3333
#endif
3434

35-
#if ((__cplusplus < 202002L) || (defined(WIDE_INTEGER_GCC) && defined(WIDE_INTEGER_AVR)))
36-
#include <ciso646>
37-
#else
38-
#include <version>
39-
#endif
35+
#include <version> // This is needed here for feature testing.
4036

4137
#if (defined(__cpp_lib_to_chars) && (__cpp_lib_to_chars >= 201611L))
4238
#include <charconv>
@@ -693,7 +689,11 @@
693689
using const_reverse_iterator = ::math::wide_integer::detail::iterator_detail::reverse_iterator<const_iterator>;
694690
#endif
695691

696-
static_assert((std::is_standard_layout<value_type>::value && std::is_trivial<value_type>::value), "Error: the value_type of dynamic_array must be POD");
692+
#if(__cplusplus > 202302L)
693+
static_assert(std::is_trivially_default_constructible_v<value_type> && std::is_trivially_copyable_v<value_type>, "Error: the value_type of dynamic_array must be POD");
694+
#else
695+
static_assert(std::is_trivial_v<value_type> && std::is_standard_layout_v<value_type>, "Error: the value_type of dynamic_array must be POD");
696+
#endif
697697

698698
// Constructors.
699699
explicit constexpr dynamic_array(size_type count_in = size_type(),

‎ref_app/src/util/STL/version‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
///////////////////////////////////////////////////////////////////////////////
2-
// Copyright Christopher Kormanyos 2007 - 2024.
2+
// Copyright Christopher Kormanyos 2019 - 2026.
33
// Distributed under the Boost Software License,
44
// Version 1.0. (See accompanying file LICENSE_1_0.txt
55
// or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -8,9 +8,8 @@
88
#ifndef VERSION_2024_06_29
99
#define VERSION_2024_06_29
1010

11-
// Implement some of <version> for compilers that do not yet support it.
12-
// In this particular case, simply include the standard ISO header.
13-
14-
#include <iso646.h>
11+
// TBD: Implement some of <version> for compilers that do not yet support it.
12+
// In this particular case, the header is empty. The feature macros should
13+
// be present, but these are not supported at the moment in util/STL.
1514

1615
#endif // VERSION_2024_06_29

‎ref_app/src/util/memory/util_n_slot_array_allocator.h‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,14 @@
5656
static_assert(SlotWidth > 0U, "SlotWidth must be greater than zero.");
5757
static_assert(SlotCount > 0U, "SlotCount must be greater than zero.");
5858
#if !(defined(_MSC_VER) && defined(_DEBUG))
59-
static_assert(std::is_trivial_v<T> && std::is_standard_layout_v<T>, "T must be a POD-like type.");
59+
#if(__cplusplus > 202302L)
60+
static_assert(std::is_trivially_default_constructible_v<T> && std::is_trivially_copyable_v<T>, "T must be a POD-like type");
61+
#else
62+
static_assert(std::is_trivial_v<T> && std::is_standard_layout_v<T>, "T must be a POD-like type");
6063
#endif
61-
static_assert(std::is_default_constructible_v<T>, "T must be default constructible for the fixed slot storage.");
62-
static_assert(std::is_copy_constructible_v<T>, "T must be copy constructible for allocator construction.");
64+
#endif
65+
static_assert(std::is_default_constructible_v<T>, "T must be default constructible for the fixed slot storage");
66+
static_assert(std::is_copy_constructible_v<T>, "T must be copy constructible for allocator construction");
6367

6468
static constexpr std::uint_fast32_t slot_width = SlotWidth;
6569
static constexpr std::size_t slot_count = SlotCount;

‎ref_app/src/util/utility/util_dynamic_array.h‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@
4545
using reverse_iterator = std::reverse_iterator<iterator>;
4646
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
4747

48-
static_assert((std::is_standard_layout<value_type>::value && std::is_trivial<value_type>::value), "Error: the value_type of dynamic_array must be POD");
48+
#if(__cplusplus > 202302L)
49+
static_assert(std::is_trivially_default_constructible_v<value_type> && std::is_trivially_copyable_v<value_type>, "Error: the value_type of dynamic_array must be POD");
50+
#else
51+
static_assert(std::is_trivial_v<value_type> && std::is_standard_layout_v<value_type>, "Error: the value_type of dynamic_array must be POD");
52+
#endif
4953

5054
// Constructors.
5155
explicit constexpr dynamic_array(size_type count_in = size_type(),

‎ref_app/target/micros/avr/make/avr_flags.gmk‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
GCC_TARGET = avr
1313
GCC_PREFIX = avr
1414

15-
GCC_VERSION = 15.2.0
15+
GCC_VERSION = 16.2.0
1616

1717
TGT_SUFFIX = elf
1818

@@ -30,7 +30,7 @@ TGT_ALLFLAGS := $(TGT_ALLFLAGS)
3030
-mlong-double=64
3131

3232
INC_PREFIX := -isystem
33-
STD_CPP := c++20
33+
STD_CPP := c++23
3434

3535
else
3636

@@ -39,17 +39,17 @@ STD_CPP := c++17
3939

4040
endif
4141

42-
STD_C := c11
42+
STD_C := c20
4343

4444
TGT_CFLAGS = -std=$(STD_C) \
4545
$(TGT_ALLFLAGS)
4646

4747
TGT_CXXFLAGS = -std=$(STD_CPP) \
4848
$(TGT_ALLFLAGS)
4949

50-
TGT_INCLUDES = $(INC_PREFIX)$(PATH_APP)/util/STL
50+
TGT_INCLUDES := $(INC_PREFIX)$(PATH_APP)/util/STL
5151

52-
#TGT_INCLUDES = $(INC_PREFIX)C:/ChrisGitRepos/avr-libstdcpp/include
52+
#TGT_INCLUDES := $(INC_PREFIX)C:/ChrisGitRepos/avr-libstdcpp/gcc16/include
5353

5454
TGT_AFLAGS =
5555

0 commit comments

Comments
 (0)