Blog
-
C++ Replace Algorithms: replace, replace_if & replace_copy
Replace values in place or into a new range with std::replace, replace_if, replace_copy, and replace_copy_if — O(n) scans and vs std::string::replace.
-
C++ Algorithm Reverse: std::reverse, reverse_copy &
Reverse ranges in place or into a copy with std::reverse and reverse_copy; rotate segments with std::rotate — palindromes, string reversal, and array.
-
C++ Search Algorithms: find, binary_search, lower_bound &
Choose between linear find and binary search on sorted ranges; use lower_bound, upper_bound, and equal_range for positions and equal-key runs in C++.
-
C++ Set Operations on Sorted Ranges: set_union, intersection
Run set_union, set_intersection, set_difference, set_symmetric_difference, and includes on sorted ranges — complexity, duplicates, and output iterators.
-
C++ Algorithm Sort: std::sort, stable_sort, partial_sort &
Compare C++ std::sort, stable_sort, partial_sort, and nth_element: custom comparators, partial sorts, median selection, and practical STL sorting patterns.
-
C++ Memory Alignment | Complete Guide to Alignment
C++ memory alignment, padding, alignas, alignof, False Sharing prevention, and struct optimization with practical examples.
-
C++ Allocator | Custom allocators for STL containers
Default std::allocator, passing allocators to containers, custom pool and tracking allocators, PMR monotonic_buffer_resource, and allocator propagation ...
-
C++ any | 'Type Erasing' Guide
A guide that summarizes std::any and variant·void* comparison, type safety, any_cast, practical examples, and performance overhead.
-
C++ async & launch | 'Asynchronous Execution' Guide
How std::async launch policies (async vs deferred) actually schedule work in C++, and the pitfalls that catch people relying on the default policy.
-
C++ Atomic | A Complete Guide to Memory Order
This is a development blog post summarizing C++ Atomic. #include <atomic> #include <thread> using namespace std;.