diff --git a/src/intrusive_forward_list.h b/src/intrusive_forward_list.h index 401b77dc..6d4cabcc 100644 --- a/src/intrusive_forward_list.h +++ b/src/intrusive_forward_list.h @@ -811,14 +811,15 @@ namespace etl } else { - return current_size.count; + return current_size.get_count(); } } //************************************************************************* /// Splice another list into this one. //************************************************************************* - void splice_after(iterator position, list_type& list) + template + void splice_after(iterator position, etl::intrusive_forward_list& list) { // No point splicing to ourself! if (&list != this) @@ -856,7 +857,8 @@ namespace etl //************************************************************************* /// Splice an element from another list into this one. //************************************************************************* - void splice(iterator position, list_type& list, iterator isource) + template + void splice(iterator position, etl::intrusive_forward_list& list, iterator isource) { link_type& before = *position.p_value; @@ -876,7 +878,8 @@ namespace etl //************************************************************************* /// Splice a range of elements from another list into this one. //************************************************************************* - void splice_after(iterator position, list_type& list, iterator begin_, iterator end_) + template + void splice_after(iterator position, etl::intrusive_forward_list& list, iterator begin_, iterator end_) { if (!list.empty()) { @@ -1024,6 +1027,11 @@ namespace etl { return *this; } + + size_t get_count() const + { + return 0; + } }; //************************************************************************* @@ -1069,6 +1077,11 @@ namespace etl return *this; } + size_t get_count() const + { + return count; + } + size_t count; }; diff --git a/src/intrusive_list.h b/src/intrusive_list.h index 19f66a77..1c485583 100644 --- a/src/intrusive_list.h +++ b/src/intrusive_list.h @@ -834,7 +834,7 @@ namespace etl } else { - return current_size.count; + return current_size.get_count(); } } @@ -1028,6 +1028,11 @@ namespace etl { return *this; } + + size_t get_count() const + { + return 0; + } }; //************************************************************************* @@ -1073,6 +1078,11 @@ namespace etl return *this; } + size_t get_count() const + { + return count; + } + size_t count; }; diff --git a/test/test_intrusive_forward_list.cpp b/test/test_intrusive_forward_list.cpp index ea22d215..743b0952 100644 --- a/test/test_intrusive_forward_list.cpp +++ b/test/test_intrusive_forward_list.cpp @@ -117,7 +117,7 @@ namespace //*************************************************************************** typedef etl::intrusive_forward_list DataDC0; typedef etl::intrusive_forward_list DataDC1; - typedef etl::intrusive_forward_list DataNDC0; + typedef etl::intrusive_forward_list DataNDC0; typedef etl::intrusive_forward_list DataNDC1; typedef std::vector InitialDataNDC;