Skip to content

Changelog

Morwenn edited this page Aug 15, 2017 · 22 revisions

As of today, cpp-sort is not versioned, it might someday become versioned if people actually start using it and feel that versions make it easier. This "changelog" isn't about the difference between the different versions, but between the main branches of the library.

C++14 branch

This is the main master branch. The other branches will be documented as addition/removal of features and changes of behaviour compared to this branch.

Branch name: master

Compatible compilers: g++5, clang++3.8

C++17 branch

This branch is based on the C++14 branch. There are fewer utility headers (replaced by C++17 features), and the library code has been updated to use more C++17 features for greater good.

New features:

  • string_spread_sort now accepts std::string_view and sometimes std::wstring_view

  • Sorter adapters have been updated to take advantage of deduction guides

    // C++14
    constexpr auto sort = schwartz_adapter<quick_sorter>{};
    // C++17
    constexpr auto sort = schwartz_adapter(quick_sort);

    This notably makes measures of presortedness more usable with the few sorter adapters that makes sense for them

    // C++14
    auto rem = indirect_adapter<decltype(probe::rem)>{};
    // C++17
    auto rem = indirect_adapter(probe::rem);
  • New function_constant utility to micro-optimize functions pointers and class member pointers

    insertion_sort(collection, function_constant<&foo::bar>{});

    It sometimes results in fewer indirections than a raw &foo::bar, and can be subject to empty base class optimization when stored

  • The function pointer conversion operators of sorter_facade are now constexpr when possible

Performance improvements:

  • merge_insertion_sorter can be somewhat more performant when libstdc++'s bitmap_allocator is available

Removed features:

  • <cpp-sort/utility/static_const.h> is gone: inline variables can be used instead

Branch name: c++17

Compatible compilers: g++7, clang++5.0 (SVN)