Published September 16, 2021 | Version 1.2.0

Morwenn/tight_pair: 1.2.0 — Sage

Authors/Creators

  • 1. linuxdeepin

Description

After next to no activity in over two years, I decided to give that project a long-overdue update. This release is nothing truly groundbreaking, but it does bring a few notable changes from an environment point of view, such as MSVC support or the switch from Travis CI to GitHub Actions.

Improvements
  • The library now compiles with MSVC, but only with /permissive- (#12, #14). That said the codegen seems pretty bad, as if the optimizer had issues crunching through all the indirections.
  • operator== and operator!= now benefit from the same kind of optimizations than the relational operators when possible (when comparing pairs of unsigned integers, #13).
  • Assignment from a different but compatible tight_pair is now implemented: for example assigning tight_pair<Foo, int> to tight_pair<Foo, long>. The same kind of conversion was already valid for constructors, but somehow not for assignments.
  • Implement LWG2510 (#9): make the default constructor EXPLICIT (explicit when one of the wrapped types has an explicit default constructor).
  • The comparison and relational operators are now hidden friends (#11).
Bug fixes
  • swap now actually works in a constexpr (#15). It used to rely on std::swap which isn't constexpr before C++20.
  • Fix a bug where some optimization flags were not passed correctly in Debug mode in the tests CMakeLists.txt.
Miscellaneous
  • The continuous integration was moved from Travis CI to GitHub Actions.
  • The tests were updated: mostly by stealing updates that were made to the libc++ tests since 2019, but also with a few custom tests when needed (including #10).
  • The tests can now be run with Valgrind and sanitizers. The CMake variables TIGHT_PAIR_USE_VALGRIND and TIGHT_PAIR_SANITIZE control whether those tools should be used.
  • The tests can be used to generate coverage, which the CI uploads to codecov.io.
  • The GitHub wiki associated to the project now contains a small knowledge base which documents the unfixed issues that might be encountered when using the project.
  • The Catch2 version automatically downloaded by the test suite is now v2.13.7. It used to be master but that branch hasn't been available for a while.
  • The conanfile.py shipped with the project was revamped to take advantage of more modern Conan features and practices.
  • The tests borrowed from libc++ now properly include the original license header.

Files

Morwenn/tight_pair-1.2.0.zip

Files (74.8 kB)

Name Size
md5:dde97844987366e5f8552a8742abc937
74.8 kB Preview Download

Additional details

Related works