Skip to content

Commit ae0d8ce

Browse files
committed
fix(box): fixing runtime error
1 parent 4549604 commit ae0d8ce

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

include/stdsharp/memory/allocation_value.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ namespace stdsharp
2929

3030
constexpr void size_validate(const auto& allocation) const noexcept
3131
{
32-
Expects(
33-
allocation.size() * sizeof(typename allocation_traits::value_type) >= value_size()
34-
);
32+
Expects(allocation.size() * sizeof(allocation_traits::value_type) >= value_size());
3533
}
3634

3735
constexpr void

include/stdsharp/memory/box.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ namespace stdsharp
480480
{
481481
reset();
482482

483-
if(const auto size = sizeof(T); capacity() < size)
483+
if(constexpr auto size = sizeof(T); capacity() < size)
484484
{
485485
deallocate();
486486
allocate(size);

include/stdsharp/type_traits/type_sequence.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ namespace stdsharp
6161
struct insert
6262
{
6363
template<typename... Others, auto... I, auto... J>
64-
static consteval auto impl(std::index_sequence<I...>, std::index_sequence<J...>)
64+
static consteval auto impl( //
65+
std::index_sequence<I...> /*unused*/,
66+
std::index_sequence<J...> /*unused*/
67+
)
6568
{
6669
return regular_type_sequence<
6770
type_sequence::type<I>...,

include/stdsharp/type_traits/value_sequence.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ namespace stdsharp
106106
struct insert
107107
{
108108
template<auto... Others, auto... I, auto... J>
109-
static consteval auto impl(std::index_sequence<I...>, std::index_sequence<J...>)
109+
static consteval auto impl( //
110+
std::index_sequence<I...> /*unused*/,
111+
std::index_sequence<J...> /*unused*/
112+
)
110113
{
111114
return regular_value_sequence<get<I>()..., Others..., get<J + Index>()...>{};
112115
}

0 commit comments

Comments
 (0)