From e546d5d313431c9f04305d7ba4e4a76dc6b8e87f Mon Sep 17 00:00:00 2001 From: Thorsten Hater <24411438+thorstenhater@users.noreply.github.com> Date: Tue, 7 Jan 2025 08:29:50 +0100 Subject: [PATCH] C++20 support do be weird? --- arbor/backends/event.hpp | 6 +++--- arbor/backends/event_stream_base.hpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arbor/backends/event.hpp b/arbor/backends/event.hpp index e062dbccb..e7abdc6d4 100644 --- a/arbor/backends/event.hpp +++ b/arbor/backends/event.hpp @@ -39,9 +39,9 @@ struct deliverable_event { target_handle handle; deliverable_event() = default; - constexpr deliverable_event(const time_type time, + constexpr deliverable_event(time_type time, target_handle handle, - const float weight) noexcept: + float weight) noexcept: time(time), weight(weight), handle(std::move(handle)) {} ARB_SERDES_ENABLE(deliverable_event, time, weight, handle); @@ -51,7 +51,7 @@ struct deliverable_event { struct deliverable_event_data { cell_local_size_type mech_index = 0; // same as target_handle::mech_index float weight = 0; - deliverable_event_data(const cell_local_size_type idx, const float w) noexcept: + deliverable_event_data(cell_local_size_type idx, float w) noexcept: mech_index(idx), weight(w) {} ARB_SERDES_ENABLE(deliverable_event_data, diff --git a/arbor/backends/event_stream_base.hpp b/arbor/backends/event_stream_base.hpp index f518d6b23..0b3fb940a 100644 --- a/arbor/backends/event_stream_base.hpp +++ b/arbor/backends/event_stream_base.hpp @@ -104,7 +104,7 @@ struct spike_event_stream_base: event_stream_base { } // loop over lanes: group events by mechanism and sort them by time - auto cell = 0; + arb_size_type cell = 0; for (const auto& lane: lanes) { auto div = divs[cell]; arb_size_type step = 0; @@ -119,7 +119,7 @@ struct spike_event_stream_base: event_stream_base { arb_assert(div + evt.target < handles.size()); const auto& handle = handles[div + evt.target]; auto& stream = streams[handle.mech_id]; - stream.spikes_.emplace_back(step, handle.mech_index, evt.time, evt.weight); + stream.spikes_.push_back(spike_data(step, handle.mech_index, evt.time, evt.weight)); stream.ev_spans_[step + 1]++; } ++cell;