Exploring C++ std::span – Part 4: Const-Correctness and Type-Safety
One of the hallmarks of modern C++ is its emphasis on type safety and const-correctness. These principles help developers write…
For Software Engineers
One of the hallmarks of modern C++ is its emphasis on type safety and const-correctness. These principles help developers write…
One of the most powerful features of std::span is its ability to create “subviews,” or smaller views over specific portions…
In C++20, std::span provides a safe, convenient way to access and iterate over contiguous data, offering many of the familiar…
What is std::span? std::span is a feature introduced in C++20, designed to provide a safe and efficient way to create…
In C++, the semicolon is more than a mere syntactical rule—it’s a critical delimiter that signifies the end of a…
Concurrency and parallelism have become vital aspects of modern C++ programming, demanding robust mechanisms for handling multi-threaded environments. Enter std::mutex, a…
In some software engineering circles, there remains a debate (or needs to be a debate) about using In-Source versus Out-of-Source…
std::expected is a powerful feature introduced in C++23 that offers a modern, type-safe alternative to traditional error-handling methods. Throughout my…
Error handling is a critical component of many C++ applications. Even so, there are many strategies we can use to…
Book Review: Modern CMake for C++ (Second Edition) by Rafał Świdziński As a CMake developer and user for over 15…
Custom allocators in C++ can be intimidating to approach in our code. C++ is renowned for its powerful standard library…
Mastering std::vector is essential for advanced C++ Development. While many experienced C++ developers are familiar with std::vector, its full potential…
The C++14 standard introduces a compelling feature: Transparent Comparators. C++ programmers often encounter the concept of comparators when working with…
The dialogue around C++ and memory safety has intensified following recent evaluations by authoritative bodies. The White House’s Office of…
My new book, Data Structures and Algorithms with the C++ STL: A guide for modern C++ practitioners, will be released…
The Service Locator pattern is a powerful design pattern that is used in many types of programs. Design patterns help…
The Decorator Pattern stands out for its unique ability to add new functionalities to objects dynamically without altering their structure. This pattern not only enhances the capabilities of individual objects but also fosters a flexible and extensible design, making it a powerful tool in the arsenal of a C++ programmer.
The implementation of mathematical equations demands a keen awareness of the computational environment. This article illustrates the importance of considering IEEE floating point representation in C++ (as well as Python and FORTRAN) for accurate and reliable computations.
Hashing, a cornerstone concept in computer science, plays a pivotal role in efficient data processing and storage. In C++, std::hash emerges as a critical component, deeply ingrained in the language’s Standard Library. This article aims to demystify std::hash, making it accessible and understandable to entry and intermediate-level C++ developers.
C++20 Callable Concepts refer to a powerful feature introduced in the C++20 standard that allows developers to specify and enforce constraints on function objects, lambdas, and other callable entities in a more expressive and type-safe manner.
What do you consider when choosing static vs. dynamic linking? Choosing the right one for your library requires a nuanced understanding of each.
I am currently authoring a new book covering data structures and algorithms using the C++ STL. I am interested to know the community’s thoughts on what would make the book a valuable addition to the C++ community!