Skip to content

Releases: rturrado/the_modern_cpp_challenge

2.2.0

06 Nov 21:47
Compare
Choose a tag to compare

Up to date with unixlike-builds-v1.5.0.

  • Changed fmt formatters to make use of overloaded operator insertion.
  • Fixed an issue in problem 66: binary_search was used in an unordered vector.

unixlike-builds 1.5.0

06 Nov 21:47
Compare
Choose a tag to compare
  • Changed fmt formatters to make use of overloaded operator insertion.
  • Fixed an issue in problem 66: binary_search was used in an unordered vector.

2.1.0

03 Nov 11:48
Compare
Choose a tag to compare

Up to date with unixlike-builds-v1.4.0.

  • Added compiler caching via sccache.
  • Fixed a concurrency problem in problem 66.
  • Fixed a memory leak in problem 71.

unixlike-builds 1.4.0

03 Nov 11:43
Compare
Choose a tag to compare
  • Changed RPATH to use '$ORIGIN/' instead of './'.
  • Fixed a concurrency problem in problem 66.

unixlike-builds 1.3.0

23 Oct 18:34
Compare
Choose a tag to compare
  • Added address sanitizer.
  • Fixed a memory leak in problem 71.

unixlike-builds 1.2.0

21 Oct 16:30
Compare
Choose a tag to compare
  • Added code coverage.

  • Added compiler caching via ccache.

  • Added unixlike-builds CI workflow.

    Triggered by a git push on the unixlike-builds branch.

    The unixlike-gcc-debug-github job:

    • checks out the repository on an ubuntu-22.04 host,
    • builds the project in debug mode (tests included),
    • runs the tests, and
    • collects the code coverage.

    The unixlike-gcc-release-docker job:

    • checks out the repository on an ubuntu-22.04 host,
    • builds the project in release mode (benchmarks and tests included),
    • runs the benchmarks, and
    • uploads an artifact containing the files we want to publish in the docker.
  • Added publish docker workflow.

    Triggered by a git push origin <tag> on the unixlike-builds branch.

    The publish-docker job:

    • waits for the unixlike-builds CI workflow to finish,
    • downloads the artifact previously uploaded by the unixlike-gcc-release-docker job,
    • logs in to DockerHub,
    • builds a docker image following the instructions in a Dockerfile,
    • tags the docker image both as unixlike-builds-v<version> and latest, and
    • publishes it to the rturrado/tmcppc-binaries repository in DockerHub.
  • Fixed issues in problems 14, 16, 47, and 96.

  • Removed problem_<number>_main() functions.

2.0.0

02 Oct 19:30
Compare
Choose a tag to compare

There is a unixlike-builds branch that is up-to-date with the main branch and can run in Unix-like systems.

However, the unixlike-builds branch uses gcc, which doesn't have support yet for all the C++20 features (especially the <format> library), so a few problems are implemented differently in that branch. Basically, the date and time problems use Howard Hinnant's <date> library instead of the <format> library.

Once gcc will have support for all the C++20 features, the main branch should be suitable to be used in a Unix-like system, and the unixlike-builds branch should be dropped.

Windows/msvc -only.

  • Added fixes and changes coming from the unixlike-builds branch.
    • CMakePresets.json.
      • updated configuration and build presets.
    • include/chapter_11_cryptography/base64.h.
      • made base64 methods static.
    • include/chapter_11_cryptography/crypt.h.
      • added namespace tmcppc::crypto.
    • src/CMakeLists.txt:
      • added SYSTEM attribute to target_include_directories command.
      • added SQLite3 package (containing the SQLite3 amalgamation within a CMake project).
      • removed the sqlite package (containing the SQLite3 amalgamation but without a CMake project).
      • updated fmt package to version 9.1.0 (containing some new chrono types).
      • updated target_compile_options.
      • updated ZipLib package (to use g++ instead of g++-11, and with target_compile_features updated to cxx_std_23).
    • src/chapter_10_archives_images_and_databases/CMakeLists.txt.
      • removed sqlite3.h and sqlite3.c files (available now via the SQLite3 package).
    • test/CMakeLists.txt.
      • updated perceptualdiff package and shared libraries block.
    • Include headers.
      • removed unnecessary headers.
      • renamed external library "headers" to <headers>.
      • undefed NDEBUG before including <assert> so assert call is available in release builds.
    • Fixed Unix compilation.
      • added [[maybe_unused]].
      • avoided using the result of an assignment as a boolean check.
      • changed string.insert(0, <string_literal>) to string = <string_literal> + std::move(string).
      • defined fmt formatters prior to their first use.
      • fixed some warnings treated as errors (-Wconversion -Wsign-conversion).
      • fixed uneven block braces (due to a bad use of ifdef/endif).
      • fixed unimplemented function warnings by updating function declarations to match their definitions.
      • removed constexpr from methods containing non-constexpr code.
      • removed default arguments from virtual methods.
      • renamed members so that they are not named like types.
      • renamed variables to avoid shadowing.
    • Fixed some typos, and corrected grammar.
    • Fixed tests.
      • added _WIN32 blocks using regex pattern \\d and __GNUC__ blocks using regex pattern [0-9].
      • avoided having two instances of a boost asio connector accepting from (binding to) a same endpoint.
      • avoided subtracting 500 years from current time (changed test to use absolute time January/1/1970 instead).
      • fixed tests relying on concrete error messages from boost asio resolver.
      • fixed tests relying on files not being decompressed at a folder like /tmp (directly pending from /).
      • fixed tests relying on order of files when using the recursive directory iterator.
    • CLion's Inspect Code suggestions:
      • added & to operator++(int).
      • added [[nodiscard]].
      • added override keyword to derived classes destructors.
      • added override keyword to derived classes virtual methods.
      • changed empty constructor implementations to default.
      • changed some methods and members to static.
      • changed std::greater<int> to std::greater<>.
      • made constructors capable of accepting a single argument explicit.
      • made some methods const.
      • made some variables and function parameters non-const.
      • merged nested namespaces.
      • passed by const reference instead of pass by value.
      • passed by value and move instead of pass by const reference.
      • preferred check for empty to check against size.
      • removed extra semicolons.
      • removed unused code.
      • removed virtual keyword from derived classes virtual methods.
      • used emplace_back instead of push_back.
      • used reference bindings instead of std::pair.
      • used std::move if argument is no longer going to be used.
    • Other:
      • removed some blank lines from a few files.
      • sorted some namespace alias and using namespace blocks.
  • Config presets:
    • windows-msvc-debug, windows-msvc-release.
  • Build presets:
    • windows-msvc-debug, windows-msvc-release.

unixlike-builds 1.0.0

03 Oct 15:05
Compare
Choose a tag to compare

The unixlike-builds branch basically fixes the Unix compilation of the main branch.

Since the unixlike-builds branch uses gcc, which doesn't have support yet for all the C++20 features (especially the <format> library), a few problems are implemented differently in this branch. Basically, the date and time problems use Howard Hinnant's <date> library instead of the <format> library. This should be the only difference between main's 2.0.0 release and unixlike-builds's 1.0.0 release.

Once gcc will have support for all the C++20 features, the main branch should be suitable to be used in a Unix-like system, and the unixlike-builds branch should be dropped.

Unix/gcc -only.

  • Added fixes and changes coming from the unixlike-builds branch.
    • CMakePresets.json.
      • updated configuration and build presets.
    • include/chapter_11_cryptography/base64.h.
      • made base64 methods static.
    • include/chapter_11_cryptography/crypt.h.
      • added namespace tmcppc::crypto.
    • src/CMakeLists.txt:
      • added SYSTEM attribute to target_include_directories command.
      • added SQLite3 package (containing the SQLite3 amalgamation within a CMake project).
      • removed the sqlite package (containing the SQLite3 amalgamation but without a CMake project).
      • updated fmt package to version 9.1.0 (containing some new chrono types).
      • updated target_compile_options.
      • updated ZipLib package (to use g++ instead of g++-11, and with target_compile_features updated to cxx_std_23).
    • src/chapter_10_archives_images_and_databases/CMakeLists.txt.
      • removed sqlite3.h and sqlite3.c files (available now via the SQLite3 package).
    • test/CMakeLists.txt.
      • updated perceptualdiff package and shared libraries block.
    • Include headers.
      • removed unnecessary headers.
      • renamed external library "headers" to <headers>.
      • undefed NDEBUG before including <assert> so assert call is available in release builds.
    • Fixed Unix compilation.
      • added [[maybe_unused]].
      • avoided using the result of an assignment as a boolean check.
      • changed string.insert(0, <string_literal>) to string = <string_literal> + std::move(string).
      • defined fmt formatters prior to their first use.
      • fixed some warnings treated as errors (-Wconversion -Wsign-conversion).
      • fixed uneven block braces (due to a bad use of ifdef/endif).
      • fixed unimplemented function warnings by updating function declarations to match their definitions.
      • removed constexpr from methods containing non-constexpr code.
      • removed default arguments from virtual methods.
      • renamed members so that they are not named like types.
      • renamed variables to avoid shadowing.
    • Fixed some typos, and corrected grammar.
    • Fixed tests.
      • added _WIN32 blocks using regex pattern \\d and __GNUC__ blocks using regex pattern [0-9].
      • avoided having two instances of a boost asio connector accepting from (binding to) a same endpoint.
      • avoided subtracting 500 years from current time (changed test to use absolute time January/1/1970 instead).
      • fixed tests relying on concrete error messages from boost asio resolver.
      • fixed tests relying on files not being decompressed at a folder like /tmp (directly pending from /).
      • fixed tests relying on order of files when using the recursive directory iterator.
    • CLion's Inspect Code suggestions:
      • added & to operator++(int).
      • added [[nodiscard]].
      • added override keyword to derived classes destructors.
      • added override keyword to derived classes virtual methods.
      • changed empty constructor implementations to default.
      • changed some methods and members to static.
      • changed std::greater<int> to std::greater<>.
      • made constructors capable of accepting a single argument explicit.
      • made some methods const.
      • made some variables and function parameters non-const.
      • merged nested namespaces.
      • passed by const reference instead of pass by value.
      • passed by value and move instead of pass by const reference.
      • preferred check for empty to check against size.
      • removed extra semicolons.
      • removed unused code.
      • removed virtual keyword from derived classes virtual methods.
      • used emplace_back instead of push_back.
      • used reference bindings instead of std::pair.
      • used std::move if argument is no longer going to be used.
    • Other:
      • removed some blank lines from a few files.
      • sorted some namespace alias and using namespace blocks.
  • Config presets:
    • unixlike-gcc-debug, unixlike-gcc-release.
  • Build presets:
    • unixlike-gcc-debug, unixlike-gcc-release.

1.0.0

02 Sep 21:11
Compare
Choose a tag to compare

Initial release.

Windows/msvc -only.

  • Implemented the 100 problems from The Modern C++ Challenge book.
  • Added tests and benchmarks.
  • Config presets:
    • no-test.
    • test.
    • benchmark.
  • Build presets:
    • x64-Debug-no-test, x64-Release-no-test.
    • x64-Debug-test, x64-Release-test.
    • x64-Debug-test-asan, x64-RelWithDebInfo-test-asan.
    • x64-Release-benchmark, x64-RelWithDebInfo-benchmark.