Commit ebe50576 authored by Jan Koniarik's avatar Jan Koniarik
Browse files

small updates to cbuffer/svector and register map

parent e946028a
Pipeline #105305 passed with stage
in 9 seconds
......@@ -81,7 +81,7 @@ public:
using reg_def_type = typename reg_type< Key >::def_type;
protocol_register_map() = default;
protocol_register_map( Regs::value_type... args )
protocol_register_map( typename Regs::value_type... args )
: registers_( Regs{ args }... )
{
}
......
......@@ -351,7 +351,7 @@ public:
return i_ <=> other.i_;
}
auto operator==( const static_circular_buffer_iterator& other ) const
bool operator==( const static_circular_buffer_iterator& other ) const
{
return i_ == other.i_;
}
......
......@@ -176,14 +176,14 @@ private:
// --------------------------------------------------------------------------------
void delete_item( size_type i )
{
ref_item( i ).~T();
std::destroy_at( std::addressof( ref_item( i ) ) );
}
template < typename... Args >
void emplace_item( size_type i, Args&&... args )
{
void* gen_ptr = reinterpret_cast< void* >( &data_[i] );
::new ( gen_ptr ) T( std::forward< Args >( args )... );
std::construct_at(
reinterpret_cast< T* >( &data_[i] ), std::forward< Args >( args )... );
}
// Reference to the item in data_storage.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment