In my book, Modern C++ Programming Cookbook, I discussed several testing frameworks for C++, more precisely, Boost.Test, Google Test, and Catch (which stands for C++ Automated Test Cases in a Header). Since the publishing of the book, a new version of Catch, called Catch2 has been released. This provides new functionalities, but also a series of breaking changes with Catch, including the drop of support for pre-C++11 compilers. For a list of changes, you can see the Catch2 release notes. Catch2 is available as a single-header library, is open-sources and cross-platform, and written for C++11/14/17/latest. In this article, I want to give a brief example of how you can write tests for C++ using Catch2.

Read More Writing C++ unit tests with Catch2

A couple years ago I wrote a post called A better date and time C++ library about Howard Hinnant’s date library (I actually planned for several posts, but only the first was materialized). A slightly modified version of the library has been voted in for C++ 20 at the ISO committee meeting in Jacksonville this month. You can find the actual proposal here D0355R7: Extending <chrono> to Calendars and Time Zones.

Read More C++20 calendars and time zones

If you are working with TFS and have projects created in older versions you might want to use features available in newer versions of TFS (given that you have updated to such a newer version). These features could be code reviews, feedback, my work, storyboarding, and others. In this post, I will explain how to manually modify the team project settings to enable code review. You can only do this is you have proper access rights.

Read More Update a TFS team project manually to support code reviews

curl is a project containing a command line tool and a library that can be used to transfer data using a variety of protocols, including, of course, HTTP and HTTPS. The library API is written in C, but there are various C++ wrappers on top of it. One of those is curlcpp. In this article, I will show how to build these libraries for Windows with Visual Studio.

Read More Using the curl library from C++ on Windows

I have recently submitted a proposal for a new standard library for universally unique identifiers. The library is called uuid and the paper, P0959R0 – A Proposal for a Universally Unique Identifier Library, is available on Github. The design of the library is inspired by the Boost Uuid Library and the Crossuuid library. I got lots of great feedback that shaped the formed of the proposal from people on the ISO C++ Standard – Future Proposals forum.

Read More stduuid – A C++ library for universally unique identifiers

Four years ago I wrote a blog post that shown how to build a web server using the http_listener from the C++ REST SDK library as well as a client application that consumed the exposed resources. Over the years there have been various changes to the API from the library and some readers complained the…

Read More Revisited: Full-fledged client-server example with C++ REST SDK 2.10

Today I wanted to rework an example that I wrote years ago. I was a client-server example using the C++ REST SDK. I haven’t worked with the library for a while, so I needed to install the latest version first. If you go to the C++ REST SDK project page it says you need to…

Read More But why?