Tag: C++17
21 posts
-
[2026] C++ string vs string_view: Fast, Non-Owning String Handling (C++17)
std::string vs std::string_view: avoid copies in read-only APIs, allocation costs, lifetime rules, substring performance, and null-termination caveats.
-
[2026] C++ std::optional vs Pointers: Representing No Value Safely
std::optional vs nullptr: optional models absent values with type safety; pointers for non-owning observers, polymorphism, and shared ownership. Stack-f...
-
[2026] C++ any | Type Erasing Guide
A guide that summarizes std::any and variant·void* comparison, type safety, any_cast, practical examples, and performance overhead.
-
[2026] C++ CTAD | Class Template Argument Deduction (C++17)
Learn C++17 CTAD: omit template arguments for `pair`, `vector`, and custom types. Deduction guides, `explicit` constructors, and common pitfalls with `i...
-
[2026] C++ std::variant vs union Complete Comparison | Type-Safe vs Unsafe Sum Types
Master C++ sum types: std::variant (type-safe, std::visit, exceptions) vs union (unsafe, manual tracking, legacy). Complete comparison with use cases, p...
-
[2026] C++ std::any vs void* Complete Comparison | Type-Safe vs Unsafe Type Erasure
Master C++ type erasure: std::any (type-safe, runtime checks, exceptions) vs void* (unsafe, manual casting, legacy). Complete comparison with use cases,...
-
[2026] C++ Copy Elision | When Copies and Moves Disappear
Copy elision: RVO, NRVO, C++17 guaranteed elision for prvalues, parameter initialization, and why returning local variables with std::move often hurts.
-
[2026] C++ Deduction Complete Guides | Customizing CTAD in C++17
Deduction guides for CTAD: syntax, iterator pairs, conversions from `const char*` to `std::string`, explicit guides, and pitfalls with ambiguous overloads.
-
[2026] C++ directory_iterator | Traverse folders with std::filesystem
directory_iterator vs recursive_directory_iterator, directory_options, symlinks, error_code overloads, filtering, disk usage, and performance tips for C...
-
[2026] C++ Execution Policies | Parallel and Vectorized STL (C++17)
std::execution::seq, par, par_unseq: when parallel algorithms help, data races, exceptions, and profiling parallel sort and reduce.
-
[2026] C++ Fold Expressions | Folding Parameter Packs in C++17
C++17 fold expressions explained: unary/binary folds, left vs right, empty packs, supported operators, and patterns for sum, print, all_of, and containers.
-
[2026] C++ `if constexpr` | Compile-Time Branching in Templates (C++17)
Use `if constexpr` to discard untaken branches during instantiation—unlike runtime `if`, avoiding ill-formed code in unused branches for templates.
-
[2026] C++ std::optional Complete Guide | nullopt, Monadic Ops (C++23), and Patterns
std::optional vs nullptr and exceptions: value_or, and_then, transform, or_else, performance, and production error-handling patterns (C++17–C++23).
-
[2026] C++ Parallel Algorithms | Parallel Algorithm Complete Guide
C++ Parallel Algorithms: execution policy, parallel arrangement, principles, code, and practical applications. Start now.
-
[2026] C++ std::filesystem::path | Cross-platform paths in C++17
Use std::filesystem::path to join, normalize, and inspect paths portably. Covers filename, extension, parent_path, absolute, canonical, weakly_canonical...
-
[2026] C++ Structured Bindings (C++17): Tuples, Maps, and auto [a,b]
C++17 structured bindings: decomposing tuple, pair, array, aggregates; auto&, const auto&; map iteration; pitfalls with temporaries; custom get protocol.
-
[2026] C++ tuple apply | Application of tuples guide
Everything about C++ tuple apply : from basic concepts to practical applications. Master key content quickly with examples.Tuple application guide. Wh...
-
[2026] Advanced C++ Variadic Templates | Pack Expansion and Fold Expressions
Deep dive into variadic templates: parameter packs, expansion patterns, C++17 folds, and practical tips for logging, type lists, and perfect forwarding.
-
[2026] C++ variant | Type-safe union Complete Guide
std::variant is a type-safe union introduced in C++17. It can store a value of one of several types, and keeps track of which type it is currently stori...s union, it provides type safety and automatic life cycle management.
-
[2026] C++ std::filesystem Complete Guide | Cross-Platform Path, Directory, File Operations [#37-1]
Master C++ std::filesystem: fix Windows vs POSIX path bugs with path operations, directory iteration (recursive), file copy/move/delete, permissions, er...
-
[2026] What Is C++? History, Standards (C++11–23), Use Cases, and How to Start
C++ overview for beginners: evolution from C, C++11/17/20/23, game/systems/finance use cases, pros and cons, myths, learning roadmap, and production pat...