Skip to content

Releases: Kaaserne/cpp-lazy

v9.0.1

03 Feb 08:28
9971593

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v9.0.0...v9.0.1

v9.0.0

21 Dec 20:43
31a8b17

Choose a tag to compare

Changes in a nutshell

  • Drastic API changes
  • Changed PascalCase to snake_case conventions
  • 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 libbacktrace when above is true for clang and linux
  • Version bump fmt (v12)
  • Added the option to enable/disable debug assertions in release/debug modes
  • Added cpp-lazyConfig.cmake.in in the cpp-lazy_package.zip source release code
  • Lots of new iterators
  • Now using doctest for testing
  • zip_longest_iterator::operator* now returns std::reference_wrapper if applicable
  • Implemented common reference for iterators/iterables that require a parameter pack

What's Changed (generated)

The last releases were sloppy. I plan to improve that.

New Contributors

Full Changelog: v8.0.1...v9.0.0

v8.0.1

16 Apr 15:35

Choose a tag to compare

Various CMake fixes & STANDALONE issue

v8.0.0

23 Mar 15:41
315a94a

Choose a tag to compare

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

11 Feb 15:02
d7635d3

Choose a tag to compare

Fixed various compiler errors & macro's. Added support for xmake.

v6.0.0

11 Nov 22:10
184909f

Choose a tag to compare

  • Added CString and ZipLongest includes in Lz.hpp
  • StringSplitter now returns lz::CString if LZ_STANDALONE is defined and std::string_view isn't (3f5f178)
  • Fixed ifndef guards (c9b68db)
  • Function rename from toIterRange to -> chainRange (5a1f487)

CString Iterator & ZipLongest iterator

21 Oct 14:48
42cc850

Choose a tag to compare

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 as std::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)

08 Sep 16:43
e89a6a0

Choose a tag to compare

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

29 Aug 16:54
350d80c

Choose a tag to compare

  • lz::viewRange is now lz::view
  • lz::toIter is now lz::chain
  • lz::rotate is now std::bidirectional_iterator_tag at its best
  • std::format is now std::vformat
  • fmt::format now uses fmt::runtime if C++20 or higher and if {fmt} >= 9.0.0
  • {fmt} version bump to 9.0.0
  • Removed constexpr from lz::JoinWhereIterator because std::mutex is used
  • lz::enumerate is now std::forward_iterator_tag if the iterator passed is std::bidirectional_iterator_tag or lower, still std::random_access_iterator_tag otherwise.
  • Removed all custom lz::next and lz::distance implementations
  • Added fmt::formatter for all lz iterators
  • lz::take, lz::drop and lz::slice are deleted, use lz::view instead using operator+ or std::next (see examples Take.cpp)
  • Fixed various #includes
  • Removed lz::back implementation where iterator tag = std::forward_iterator_tag.
  • lz::valuesRange is now lz::values, this also counts for lz::keysRange
  • lz::cartesian no longer is std::random_access_iterator_tag by default
  • If the input iterator in lz::zip is bidirectional, ZipIterator will be a forward iterator

Format specifier & fmt 8 support

24 Jul 10:04
371f9ef

Choose a tag to compare

  • A new parameter has been added to join, strJoin and toString() 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 just to<std::list>(args...).
  • Reduced symbol sizes by if constexpr and enable if
  • Removed reference from reference typedef in lz::range
  • Added std::decay in to<> 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: copyTo and transformTo that copies/transforms the current view inside the given output iterator.