Releases: slavenf/sfl-library
1.8.2
1.8.1
-
Fixed issue with MSVC compiler that does not correctly set
__cplusplus
unless compiler flag/Zc:__cplusplus
is specified soconstexpr
andnodiscard
were basically always disabled. Now, if MSVC compiler is used then library uses_MSVC_LANG
instead of__cplusplus
, that allows usage of newer C++ standard features without explicitly specifying/Zc:__cplusplus
. Thanks to @ZehMatt. -
Added
iterator_concept
member type tosfl::dtl::normal_iterator
in C++20 that enables use ofstd::ranges
. Thanks to @ZehMatt.For example, the following code will now successfuly compile in C++20:
static_assert(std::random_access_iterator<sfl::small_vector<uint8_t, 16>::iterator>); static_assert(std::contiguous_iterator<sfl::small_vector<uint8_t, 16>::iterator>); static_assert(std::ranges::contiguous_range<sfl::small_vector<uint8_t, 16>>); static_assert(std::ranges::contiguous_range<sfl::vector<uint8_t>>);
-
Fixed bug in
sfl::dtl::make_index_sequence
. Fortunately, this bug never caused a problem, but it had to be fixed to avoid problems in the future.
1.8.0
1.7.0
-
Iterators are now distinct types for all containers.
Iterators are no more aliases forpointer
andconst_pointer
.Now it is possible to overload functions for different iterators, for example:
void test(const T*); void test(sfl::compact_vector<T>::const_iterator); void test(sfl::small_vector<T, 10>::const_iterator); void test(sfl::small_vector<T, 20>::const_iterator); void test(sfl::small_flat_set<T, 10>::const_iterator); void test(sfl::small_flat_set<T, 20>::const_iterator); void test(sfl::static_unordered_flat_set<T, 10>::const_iterator); void test(sfl::static_unordered_flat_set<T, 20>::const_iterator);
The above example cannot be compiled with older versions of this library
because iterators are just aliases to pointers and all overloads are
equivalent to the overload forconst T*
.
- Small flat map: Added heterogeneous
at
. - Small flat map: Added heterogeneous
insert_or_assign
. - Small flat map: Added heterogeneous
operator[]
. - Small flat map: Added heterogeneous
try_emplace
. - Small flat set: Added heterogeneous
insert
. - Small unordered flat map: Added heterogeneous
at
. - Small unordered flat map: Added heterogeneous
insert_or_assign
. - Small unordered flat map: Added heterogeneous
operator[]
. - Small unordered flat map: Added heterogeneous
try_emplace
. - Small unordered flat set: Added heterogeneous
insert
. - Static flat map: Added heterogeneous
at
. - Static flat map: Added heterogeneous
insert_or_assign
. - Static flat map: Added heterogeneous
operator[]
. - Static flat map: Added heterogeneous
try_emplace
. - Static flat set: Added heterogeneous
insert
. - Static unordered flat map: Added heterogeneous
at
. - Static unordered flat map: Added heterogeneous
insert_or_assign
. - Static unordered flat map: Added heterogeneous
operator[]
. - Static unordered flat map: Added heterogeneous
try_emplace
. - Static unordered flat set: Added heterogeneous
insert
.
- All containers: Use
std::distance
instead ofoperator-
just for better readability. - All containers: Use
this->
in public member functionswap
just for better readability. - All small containers: Renamed private data member
end_
toeos_
(end-of-storage). - Small flat map: Refactored private member function
insert_exactly_at
. - Small flat set: Refactored private member function
insert_exactly_at
. - Small flat multimap: Refactored private member function
insert_exactly_at
. - Small flat multiset: Refactored private member function
insert_exactly_at
. - Small unordered flat map: Refactored private member function
emplace_back
. - Small unordered flat set: Refactored private member function
emplace_back
. - Small unordered flat multimap: Refactored private member function
emplace_back
. - Small unordered flat multiset: Refactored private member function
emplace_back
. - Small vector: Refactored public member functions
emplace
andemplace_back
. - Small vector: Refactored private member functions
insert_fill_n
andinsert_range
. - Updated documentation.
1.6.0
1.5.0
- New containers:
static_flat_map
.static_flat_set
.static_flat_multimap
.static_flat_multiset
.static_unordered_flat_map
.static_unordered_flat_set
.static_unordered_flat_multimap
.static_unordered_flat_multiset
.
- All small containers: Using anonymous union for internal storage. The effect
is the same as before, but the code is more readable and it is consistent with
static containers. - Small flat map: Refactored
insert_exactly_at
. - Small flat map: Fixed memory leak in
insert_exactly_at
if exception is thrown. - Small flat map: Refactored
erase
. - Small flat set: Refactored
insert_exactly_at
. - Small flat set: Fixed memory leak in
insert_exactly_at
if exception is thrown. - Small flat set: Refactored
erase
. - Small flat multimap: Refactored
insert_exactly_at
. - Small flat multimap: Fixed memory leak in
insert_exactly_at
if exception is thrown. - Small flat multimap: Refactored
erase
. - Small flat multiset: Refactored
insert_exactly_at
. - Small flat multiset: Fixed memory leak in
insert_exactly_at
if exception is thrown. - Small flat multiset: Refactored
erase
. - Small unordered flat map: Removed
insert_unordered
and addedemplace_back
- Small unordered flat set: Removed
insert_unordered
and addedemplace_back
- Small unordered flat multimap: Removed
insert_unordered
and addedemplace_back
- Small unordered flat multiset: Removed
insert_unordered
and addedemplace_back
- Static vector: Refactored copy constructor.
- Static vector: Refactored move constructor.
- Static vector: Refactored copy assignment operator.
- Static vector: Refactored move assignment operator.
- Static vector: Refactored
emplace
.
1.4.0
- New container
static_vector
. - Compact vector: Improved tests for
assign
. - Compact vector: Improved tests for
resize
. - Segmented devector: Refactored member function
emplace
. - Segmented devector: Refactored private member function
insert_fill_n
. - Segmented devector: Refactored private member function
insert_range
. - Segmented devector: Improved tests for
assign
. - Segmented devector: Improved tests for
resize
. - Segmented devector: Improved tests for
resize_front
. - Segmented devector: Improved tests for
resize_back
. - Segmented vector: Refactored member function
resize
. - Segmented vector: Refactored private member function
insert_fill_n
. - Segmented vector: Refactored private member function
insert_range
. - Segmented vector: Improved tests for
assign
. - Segmented vector: Improved tests for
emplace_back
. - Segmented vector: Improved tests for
emplace
. - Small vector: Refactored member function
emplace
. - Small vector: Refactored member function
erase
. - Small vector: Refactored private member function
assign_fill_n
. - Small vector: Refactored private member function
assign_range
. - Small vector: Refactored private member function
insert_fill_n
. - Small vector: Refactored private member function
insert_range
. - Small vector: Improved tests for
assign
. - Small vector: Improved tests for
resize
.
1.3.1
1.3.0
- New container
segmented_devector
(segmented double-ended vector). - All containers: Added member function
available
. - All containers: Moved common private functions into new header
private.hpp
. - Implemented custom hierarchical algorithms
copy
,move
,fill
, etc. in
headerprivate.hpp
that are aware of segmented iterators. - All containers: Use algorithms from header
private.hpp
whenever possible. - Segmented vector: Significantly improved performances by using algorithms
from headerprivate.hpp
. - Segmented vector: Reworked member function
emplace
. - Segmented vector: Reworked member function
emplace_back
. - Segmented vector: Reworked member function
resize
. - Segmented vector: Reworked private member function
grow_storage
. - Segmented vector: Reworked private member function
shrink_storage
. - Segmented vector: Reworked private member function
assign_fill_n
. - Segmented vector: Reworked private member function
assign_range
. - Segmented vector: Reworked private member function
insert_fill_n
. - Segmented vector: Reworked private member function
insert_range
. - Segmented vector: Various small improvements (added comments, added
const
qualifiers, renamed function and variables, usestd::addressof
and other
minor changes that make code more readable). - Segmented vector: Added missing tests for
reserve
andshrink_to_fit
. - Segmented vector: Improved tests for
resize
. - Small vector: Renamed variables and exchanged first and second case in
member functionresize
for better readability. - All containers: Use
sfl::dtl::enable_if_t
instead ofstd::enable_if
for better readability. - All containers: Use SFINAE instead of iterator tag dispatching to select the
most appropriate private member functionsinitialize_range
,assign_range
,
insert_range
and similar.
1.2.4
- Refactoring insert functions in small maps and sets. Removed duplicated code.
Added private member function for checkinghint
iterator. - Removed private nested class
temporary_value
from all containers.
That class was actually was unnecessary. Just usevalue_type
instead of. - Reworked move assignment operator of
segmented_vector
. Old move assignment
operator had unusual behavior: in some situations it behaved likeswap
. - Reworked and improved all tests.
- Added GNU makefiles for test for GCC/Clang and Visual C++ compilers.
- Reworked scripts for testing on Arch Linux and CentOS 7.
- Added script for testing on Windows.
- Reworked and improved
erase(iterator)
anderase(iterator, iterator)
member functions. - Added GitHub actions for automated testing.
- Added CMake support. Thanks to @ZehMatt and @johannes-wolf.