mirror of
https://github.com/ETLCPP/etl.git
synced 2026-05-01 11:29:09 +08:00
Added static assert for variadic constructor
Fixed missing this-> prefix for current_size
This commit is contained in:
parent
24b241e10a
commit
ec08fe48df
@ -632,6 +632,8 @@ namespace etl
|
||||
template <typename... TLinks>
|
||||
intrusive_forward_list(link_type& first, TLinks&... links)
|
||||
{
|
||||
ETL_STATIC_ASSERT((etl::is_base_of_all<link_type, TLinks...>::value), "Mixed link types");
|
||||
|
||||
this->current_size = 0;
|
||||
this->start.etl_next = &first;
|
||||
link_type* last = make_linked_list(this->current_size, first, static_cast<link_type&>(links)...);
|
||||
|
||||
@ -692,9 +692,11 @@ namespace etl
|
||||
template <typename... TLinks>
|
||||
intrusive_list(link_type& first, TLinks&... links)
|
||||
{
|
||||
current_size = 0;
|
||||
ETL_STATIC_ASSERT((etl::is_base_of_all<link_type, TLinks...>::value), "Mixed link types");
|
||||
|
||||
this->current_size = 0;
|
||||
this->terminal_link.etl_next = &first;
|
||||
link_type* last = make_linked_list(current_size, first, static_cast<link_type&>(links)...);
|
||||
link_type* last = make_linked_list(this->current_size, first, static_cast<link_type&>(links)...);
|
||||
first.etl_previous = &this->terminal_link;
|
||||
last->etl_next = &this->terminal_link;
|
||||
this->terminal_link.etl_previous = last;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user