# Cpp Docs

> |

- **Type:** Skill
- **Install:** `agentstack add skill-pledgeandgrow-pledge-skills-cpp`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [pledgeandgrow](https://agentstack.voostack.com/s/pledgeandgrow)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [pledgeandgrow](https://github.com/pledgeandgrow)
- **Source:** https://github.com/pledgeandgrow/pledge-skills/tree/main/skills/cpp

## Install

```sh
agentstack add skill-pledgeandgrow-pledge-skills-cpp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# C++ Expert (C++26)

**Official Documentation:** https://en.cppreference.com/w/

## Quick Reference

| Topic | File |
|-------|------|
| Installation, compilers (GCC, Clang, MSVC), build systems (CMake, Make), compiler flags, tooling | `getting-started.md` |
| Basic syntax, comments, main function, preprocessor directives, translation units, linkage | `basics-syntax.md` |
| Fundamental types, type modifiers, type inference (auto, decltype), type conversion, narrowing | `types.md` |
| Variables, scope, storage duration, qualifiers (const, constexpr, constinit, volatile, mutable), references | `variables.md` |
| Operators (arithmetic, comparison, logical, bitwise, member access, ternary, spaceship), operator overloading | `operators.md` |
| Control structures (if/else, switch, while, do-while, for, range-for, break, continue, goto) | `control-structures.md` |
| Functions, overloading, default arguments, lambda expressions, constexpr/consteval/constinit, function pointers | `functions.md` |
| Classes, constructors, destructors, copy/move semantics, RAII, rule of 0/3/5, access specifiers, inheritance, virtual functions, polymorphism, abstract classes, friend, nested classes | `classes-objects.md` |
| Function templates, class templates, variadic templates, template specialization, CTAD, concepts | `templates.md` |
| Smart pointers (unique_ptr, shared_ptr, weak_ptr), raw pointers, references, new/delete, allocators, PMR | `memory.md` |
| Exceptions (try/catch/throw, noexcept, exception hierarchy, RAII and exceptions, error codes) | `exceptions.md` |
| STL containers (vector, array, deque, list, forward_list, map, multimap, unordered_map, set, stack, queue, priority_queue, span, flat_map) | `stl-containers.md` |
| STL algorithms (sort, find, transform, accumulate, partition, etc.), iterators, ranges, views | `stl-algorithms.md` |
| Strings (string, string_view, char_traits, C strings, formatting) | `stl-strings.md` |
| Utilities (pair, tuple, optional, variant, any, function, bind, reference_wrapper, source_location) | `stl-utilities.md` |
| Concurrency (thread, jthread, mutex, lock_guard, unique_lock, shared_mutex, condition_variable, future/promise, async, latch, barrier, counting_semaphore, atomic, memory order, stop_token) | `concurrency.md` |
| I/O (iostream, fstream, stringstream, format, print, println, file system) | `io.md` |
| Chrono (duration, time_point, clock, calendar, time zone, formatting) | `chrono.md` |
| Numerics (complex, random, valarray, ratio, numeric limits, math functions, special math) | `numerics.md` |
| Coroutines (co_await, co_yield, co_return, task, generator, promise_type) | `coroutines.md` |
| Regular expressions (std::regex, regex_match, regex_search, regex_replace, ECMAScript syntax, iterators) | `stl-regex.md` |
| Modules (export, import, module interface, module partition, header units), headers | `modules.md` |
| Metaprogramming (type traits, constexpr, consteval, concepts, SFINAE, fold expressions, compile-time programming) | `metaprogramming.md` |
| Idioms and patterns (RAII, Rule of 0/3/5, CRTP, Pimpl, NVI, type erasure, copy-and-swap, value categories, ODR, ADL, design patterns) | `idioms-patterns.md` |
| C standard library compatibility (C headers, C I/O, C memory, C strings, signals, assertions, errno, locale, wide chars) | `c-compat.md` |
| Testing and benchmarking (Google Test, Catch2, doctest, Google Benchmark, mocks, fuzzing, CMake integration) | `testing.md` |
| Keywords, operators, escape sequences, standard library headers, predefined macros, attributes, integer type ranks | `keywords-reference.md` |
| Advanced topics (contracts, named requirements, freestanding, SIMD, reflection, evaluation order, debugging, safe reclamation, inplace_vector, hive) | `advanced-topics.md` |
| C++26/23/20/17/14/11 new features and migration | `whats-new.md` |

## Core Philosophy

C++ is a **compiled, statically typed, multi-paradigm** language designed for systems programming and performance-critical applications. Key principles:

1. **Zero-Overhead Abstraction** — "What you don't use, you don't pay for; what you do use, you couldn't write better by hand"
2. **RAII** — Resource Acquisition Is Initialization — resources are tied to object lifetimes
3. **Value Semantics** — objects are copied/moved by default; use references for indirection
4. **Compile-Time Computation** — templates, constexpr, concepts — move work to compile time
5. **Deterministic Destruction** — destructors run at scope exit, no GC pauses
6. **Backward Compatibility** — C++ maintains C compatibility; legacy code still compiles

## Hello World

```cpp
#include 

int main() {
    std::print("Hello, World!\n");
}
```

## Hello World (C++20 with iostream)

```cpp
#include 

int main() {
    std::cout  CMakeLists.txt  src/main.cpp 
int main() { std::print("Hello, {}!\n", "World"); }
EOF
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
./build/myapp
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [pledgeandgrow](https://github.com/pledgeandgrow)
- **Source:** [pledgeandgrow/pledge-skills](https://github.com/pledgeandgrow/pledge-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-pledgeandgrow-pledge-skills-cpp
- Seller: https://agentstack.voostack.com/s/pledgeandgrow
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
