C++ Modifiers and Specifiers: Precise Control of Types and Behaviors

C++ Modifiers and Specifiers: Precise Control of Types and Behaviors

Welcome to follow and continuously share insights on learning C++ Selected Previous Articles C++ std::thread: A Cross-Platform Thread Management Tool for Concurrency From Explicit to Smart: Core Features of C++ Class Templates C++ Exception Handling: From Crashes to the Art of Elegant Error Management Since the birth of C++11 and the release of C++23 in … Read more

Compile-Time Magic: C++23’s std::expected and the Limits of Compile-Time Computation

Today, let’s talk about a “black magic” tool brought by C++23—std::expected. It is not just an upgraded version of error handling; it can perfectly combine with compile-time computation (constexpr), allowing you to handle “expected values” or “unexpected errors” at the compilation stage. Imagine calculating complex expressions during code compilation, returning error messages directly if something … Read more

C++17 Features Used in plog

C++17 Features Used in plog plog is a relatively lightweight logging library primarily based on C11/14, which **does not heavily rely on C17**, but it does support and utilize some C++17 features. 1. Inline Variables The inline variable feature introduced in C++17 allows the definition of global variables in header files without violating the ODR … Read more