Skip to content

Releases: jkalias/functional_cpp

1.1.1

15 Jun 13:49
3a5c2ea

Choose a tag to compare

Bug fixes, a safety improvement, and performance work since 1.1.0. No source changes are required to upgrade.

Bug fixes

  • fcpp::set::min() / max() now respect the set's comparator and run in O(1). Previously they used std::min_element/std::max_element, which rank by operator< and could return the wrong element for sets with a custom comparator.
  • fcpp::set::operator[] (non-const) no longer fails to compile.
  • fcpp::optional (the pre-C++17 fallback): fixed a memory leak on copy-assignment and a value-loss bug on self-assignment.
  • fcpp::set iterator accessors now declare their return types with the set's comparator, fixing fragile type assumptions for custom-comparator sets.

Safety: consistent precondition checks

  • Precondition checks (subscript bounds, replace_range_at, zip on unequal sizes) are now enforced identically in debug and release builds via std::abort(). Previously these were asserts that were compiled out under NDEBUG, so release builds could silently invoke undefined behavior / buffer overflows.
  • index_range hardened against signed-integer overflow, and its invalid sentinel is now const.
  • New opt-out: define FCPP_NO_PRECONDITION_CHECKS to compile the checks out for hot paths whose inputs are already validated.

Performance

  • Eliminated unnecessary container copies across non-mutating operations (filtered, sorted, removing_*, inserting_*, replacing_range_at, map, and the set/map equivalents) by moving internal containers into the returned wrapper instead of copying them.
  • insert_back no longer copies the inserted element twice, and set::keys() no longer performs a pessimizing move.

Compatibility

  • No public API changes. C++11 and C++17 supported as before.
  • Behavior change to note: a precondition violation now reliably terminates the process in release builds (it was undefined behavior before). Code that previously relied on that UB "happening to work" should be reviewed.

1.1.0

04 May 18:57
764adeb

Choose a tag to compare

Added lazy operations to all fcpp containers for improved performance of large containers

1.0.2

02 May 17:19
086bca2

Choose a tag to compare

Added fcpp::map as a new functional container wrapper to std::map

1.0.1

26 May 07:55
2abf04b

Choose a tag to compare

Bug fix: fixed compiler error when only "vector.h" included
Bug fix: fixed crash for fcpp::optional due to missing copy constructor

1.0.0

14 Apr 15:12

Choose a tag to compare

Update README.md for reduce