Skip to content

Commit

Permalink
Fix qa_buffer precondition failure #427
Browse files Browse the repository at this point in the history
Signed-off-by: drslebedev <[email protected]>
  • Loading branch information
drslebedev authored and wirew0rm committed Sep 30, 2024
1 parent 714dddb commit 080b395
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions core/test/qa_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@ struct TestStruct {
[[nodiscard]] constexpr bool test() const noexcept { return true; }
};

void consumableInputRangeTest1(auto in) { [[maybe_unused]] const auto inFirst = in[0]; }

void consumableInputRangeTest2(gr::ConsumableSpan auto in) { [[maybe_unused]] const auto inFirst = in[0]; }

template<typename T>
void consumableInputRangeTest3(std::span<const T> in) {
[[maybe_unused]] const auto inFirst = in[0];
}

struct AllocatorPortable {};
struct AllocatorPosix {};
using CircularBufferSingle = gr::CircularBuffer<int32_t, std::dynamic_extent, gr::ProducerType::Single>;
Expand Down Expand Up @@ -101,11 +92,6 @@ const boost::ut::suite BasicConceptsTests = [] {
PublishableSpan auto value = writer.template tryReserve<SpanReleasePolicy::ProcessAll>(10);
expect(eq(0UZ, value.size())) << "for " << typeName << "\n";
}

consumableInputRangeTest1(cSpan);
consumableInputRangeTest2(cSpan);
// consumableInputRangeTest3(cSpan); // this does not compile
consumableInputRangeTest3(static_cast<std::span<const int32_t>>(cSpan));
} | CircularBufferTypesToTest();
};

Expand Down

0 comments on commit 080b395

Please sign in to comment.