Modern C plus plus Programming Cookbook
The “Modern C++ Programming Cookbook” is a comprehensive resource that delves into various aspects of modern C++ programming. It covers a wide range of topics, including advanced programming techniques, best practices, and practical examples to enhance your C++ skills. With a focus on modern programming paradigms and features, this cookbook offers valuable insights into leveraging the power of C++ for efficient and effective software development. Whether you are a beginner looking to expand your knowledge or an experienced programmer seeking to refine your skills, this cookbook provides a wealth of information to help you excel in C++ programming.
Learning Modern Core Language Features
The C++ language has gone through a major transformation in the past decade with the development and release of C++11 and then, later, with its newer versions: C++14, C++17, and C++20. These new stan...
📚 Read more at Modern C plus plus Programming Cookbook🔎 Find similar documents
Writing and invoking tests with Boost.Test
The library provides both an automatic and manual way of registering test cases and test suites to be executed by the test runner. Automatic registration is the simplest way because it enables you to...
📚 Read more at Modern C plus plus Programming Cookbook🔎 Find similar documents
Preface
C++ is one of the most popular and most widely used programming languages, and it has been like that for three decades. Designed with a focus on performance, efficiency, and flexibility, C++ combines...
📚 Read more at Modern C plus plus Programming Cookbook🔎 Find similar documents
Expressing time intervals with chrono::duration
Working with times and dates is a common operation, regardless of the programming language. C++11 provides a flexible date and time library as part of the standard library that enables us to define t...
📚 Read more at Modern C plus plus Programming Cookbook🔎 Find similar documents
Using std::any to store any value
C++ does not have a hierarchical type system like other languages (such as C or Java) and, therefore, it can't store multiple types of a value in a single variable like it is possible to with type Ob...
📚 Read more at Modern C plus plus Programming Cookbook🔎 Find similar documents
Visiting an std::variant
std::variant is a new standard container that was added to C++17 based on the boost.variant library. A variant is a type-safe union that holds the value of one of its alternative types. Although in t...
📚 Read more at Modern C plus plus Programming Cookbook🔎 Find similar documents
Exploring Testing Frameworks
Testing the code is an important part of software development. Although there is no support for testing in the C++ standard, there is a large variety of frameworks for unit testing C++ code. The purp...
📚 Read more at Modern C plus plus Programming Cookbook🔎 Find similar documents
Formatting text with std::format
The C++ language has two ways of formatting text: the printf family of functions and the I/O streams library. The printf functions are inherited from C and provide a separation of the formatting text...
📚 Read more at Modern C plus plus Programming Cookbook🔎 Find similar documents
Controlling outputs with Boost.Test
The framework provides us with the ability to customize what is shown in the test log and test report and then format the results. Currently, there are two that are supported: a human-readable format...
📚 Read more at Modern C plus plus Programming Cookbook🔎 Find similar documents
Using time I/O manipulators
Similar to the monetary I/O manipulators that we discussed in the previous recipe, the C++11 standard provides manipulators that control the writing and reading of time values to and from streams, wh...
📚 Read more at Modern C plus plus Programming Cookbook🔎 Find similar documents
Reading and writing objects from/to binary files
In the previous recipe, we learned how to write and read raw data (that is, unstructured data) to and from a file. Many times, however, we must persist and load objects instead. Writing and reading i...
📚 Read more at Modern C plus plus Programming Cookbook🔎 Find similar documents
Implementing Patterns and Idioms
Design patterns are general reusable solutions that can be applied to common problems that appear in software development. Idioms are patterns, algorithms, or ways to structure the code in one or mor...
📚 Read more at Modern C plus plus Programming Cookbook🔎 Find similar documents