Modern C++ (C++23/C++20) development specialist covering RAII, smart pointers, concepts, ranges, modules, and CMake. Use when developing high-performance applications, games, system software, or embedded systems.
Modern C++ (C++23/C++20) Development Specialist - RAII, smart pointers, concepts, ranges, modules, and CMake.
Auto-Triggers: .cpp, .hpp, .h, CMakeLists.txt, vcpkg.json, conanfile.txt, modern C++ discussions
Core Capabilities:
Smart Pointer Factory Pattern: Create a class with a static factory method that returns std::unique_ptr. Include a header for memory, define a Widget class with a static create method taking an int value parameter. The create method uses std::make_unique to instantiate and return the Widget. The constructor should be explicit and take the value parameter, storing it in a private member variable.
Concepts Constraint Pattern: Define a concept named Numeric that combines std::integral or std::floating_point constraints. Create a template function square that requires T to satisfy the Numeric concept, taking a value parameter and returning value multiplied by itself.
Ranges Pipeline Pattern: Use std::views::iota to create a range from 1 to 100, pipe it through a filter to select even numbers, then transform by squaring each value, and finally take the first 10 results.