Releases: Kaaserne/cpp-lazy
Releases · Kaaserne/cpp-lazy
v9.0.1
v9.0.0
Changes in a nutshell
- Drastic API changes
- Changed
PascalCasetosnake_caseconventions - Added various benchmarks
- Improved performance by reordering member variables in classes
- Iterators now potentially return sentinels instead of symmetric iterators
- Lots and lots of bug fixes
- Support with
operator| - More separation in header files
- Improved C++ 20 module support
- Improved compatibility for
find_package - Added stacktraces when debug assertions are fired
- Added
libbacktracewhen above is true forclangandlinux - Version bump fmt (v12)
- Added the option to enable/disable
debugassertions in release/debug modes - Added
cpp-lazyConfig.cmake.inin thecpp-lazy_package.zipsource release code - Lots of new iterators
- Now using
doctestfor testing zip_longest_iterator::operator*now returnsstd::reference_wrapperif applicable- Implemented common reference for iterators/iterables that require a parameter pack
What's Changed (generated)
- Update README.md by @Kaaserne in #154
- Please fix examples by @toge in #155
- cpp-lazy API revision by @Kaaserne in #156
- cpp-lazy API revision by @Kaaserne in #157
- Function rename & lz::BasicStringView improvements by @Kaaserne in #158
- cpp-lazy API revision by @Kaaserne in #159
- Added separate folder for iterators, renamed internal namespace to detail, added a few iterators by @Kaaserne in #160
- Created/implementation of lz::AnyView by @Kaaserne in #161
- Added IterBase by @Kaaserne in #162
- Fix for compile error when used with CPM by @adihodos in #163
- Fix possible dangling refences by @Kaaserne in #165
- Large API changes: snake_case, sentinel usage & removal of lz::join by @Kaaserne in #169
- cpp-lazy API revision by @Kaaserne in #170
- cpp-lazy API revision by @Kaaserne in #171
- Add conditional default constructors, homogeneous zip-like interfaces & as_iterator iterator by @Kaaserne in #172
- cpp-lazy API revision by @Kaaserne in #173
- Assertions & docs. Minor bug fixes by @Kaaserne in #174
- Module improvements & catch 3.9 by @Kaaserne in #175
- cpp-lazy API revision by @Kaaserne in #176
- Doctest by @Kaaserne in #177
- Pairwise iterator, compile time improvements by @Kaaserne in #178
- cpp-lazy API revision by @Kaaserne in #179
- cpp-lazy API revision by @Kaaserne in #180
- cpp-lazy API revision by @Kaaserne in #181
- Remove fmtPICFix and add cmake to build essentials zip by @Kaaserne in #182
- Change CPP-LAZY to CPP_LAZY in CMakeLists; able to use version in find_package for fmt by @Kaaserne in #183
- Add 'd' debug postfix for module builds & add DEPENDS on make package by @Kaaserne in #185
- Add more slick packaging step(s) by @Kaaserne in #186
- add pkg config file by @Kaaserne in #187
The last releases were sloppy. I plan to improve that.
New Contributors
Full Changelog: v8.0.1...v9.0.0
v8.0.1
v8.0.0
What's Changed
- Partial module support - GenerateWhile iterator by @MarcDirven in #147
- Test update Catch2 by @MarcDirven in #148
- Removed security issue by @MarcDirven in #149
- Exclusive scan iterator & code improvements by @MarcDirven in #150
- Inclusive scan by @MarcDirven in #151
- Removed type alias in template by @MarcDirven in #152
- forEachWhile & CI fix by @MarcDirven in #153
Full Changelog: v7.0.2...v8.0.0
v7.0.2
v6.0.0
CString Iterator & ZipLongest iterator
This release, two new iterators have been released:
- Zip longest, used to iterate over multiple containers, and stops when the longest container is at its end. If C++17, it uses
std::optional, otherwise, it uses an internal optional, with the same syntax & basic functions asstd::optional, so breaking changes are prevented when upgrading to C++17. - C String, used to iterate over a C style string, without having to know its length.
Also a few functions were missing documentation which is now fixed.
5.0.1 (CMake improvements)
CMake has a new target. This target is run when a new release is released. It only selects the bare essentials, that is: headers, LICENSE and CMakeLists.txt and zips this. The zip will be called cpp-lazy-src.zip, and can be downloaded and configured as follows:
# Uncomment this line to use the cpp-lazy standalone version
# set(CPP-LAZY_USE_STANDALONE TRUE)
include(FetchContent)
FetchContent_Declare(cpp-lazy
URL https://github.com/MarcDirven/cpp-lazy/releases/download/<TAG_HERE E.G. 5.0.1>/cpp-lazy-src.zip
# Below is optional
# URL_MD5 <MD5 HASH OF cpp-lazy.zip>
# If using CMake >= 3.24, preferably set <bool> to TRUE
# DOWNLOAD_EXTRACT_TIMESTAMP <bool>
)
FetchContent_MakeAvailable(cpp-lazy)
add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME} cpp-lazy::cpp-lazy)This is great because:
- It no longer downloads files you won't need
- Therefore, it's a smaller directory
- It doesn't pollute the CMake build directory with examples, tests, benchmarks etc...
Also, downloading the library {fmt} also has become a bit faster, since it doesn't use git clone anymore. Instead it uses a faster alternative.
- Fixed a compiler error where zipping with
lz::zip(list, vector)didn't compile.
5.0.0
lz::viewRangeis nowlz::viewlz::toIteris nowlz::chainlz::rotateis nowstd::bidirectional_iterator_tagat its beststd::formatis nowstd::vformatfmt::formatnow usesfmt::runtimeif C++20 or higher and if{fmt}>= 9.0.0{fmt}version bump to 9.0.0- Removed
constexprfromlz::JoinWhereIteratorbecausestd::mutexis used lz::enumerateis nowstd::forward_iterator_tagif the iterator passed isstd::bidirectional_iterator_tagor lower, stillstd::random_access_iterator_tagotherwise.- Removed all custom
lz::nextandlz::distanceimplementations - Added
fmt::formatterfor all lz iterators lz::take,lz::dropandlz::sliceare deleted, uselz::viewinstead usingoperator+orstd::next(see examplesTake.cpp)- Fixed various
#includes - Removed
lz::backimplementation where iterator tag =std::forward_iterator_tag. lz::valuesRangeis nowlz::values, this also counts forlz::keysRangelz::cartesianno longer isstd::random_access_iterator_tagby default- If the input iterator in
lz::zipis bidirectional,ZipIteratorwill be a forward iterator
Format specifier & fmt 8 support
- A new parameter has been added to
join,strJoinandtoString()to specify the{fmt}formatting rules. A default value of"{}"is given, so no syntactic changes. Example:
std::array<double, 4> array = {1.12, 1.12, 1.12, 1.12};
auto str = lz::strJoin(array, ", ", "{:.1f}");
// str == "1.1, 1.1, 1.1, 1.1"
// or
for (std::string s : lz::join(array, ", ", "{:.1f}") {
// do something with s
}- Added extra
to<>overload, that enables:to<std::list<int>>(args...)instead of justto<std::list>(args...). - Reduced symbol sizes by
if constexprandenable if - Removed reference from
referencetypedef inlz::range - Added
std::decayinto<>container type, which would normally cause a compile error - Fixed CMake lz standalone issues
- Fixed a move that did not do anything 9ae8ec0
{fmt}version 8 support- Added member methods:
copyToandtransformTothat copies/transforms the current view inside the given output iterator.