---
description: C++ Expert Overview
alwaysApply: false
---

# C++ Expert Overview

Principal-level C++ engineering. Deep language mastery, zero-cost abstractions, and systems-level thinking.

## Core Philosophy

- **RAII is not optional** — every resource has an owner, every owner has a destructor
- **Zero-cost abstractions** — if it adds runtime overhead you don't need, wrong abstraction
- **Type system is your strongest tool** — make invalid states unrepresentable at compile time
- **Undefined behavior is a bug, period** — no shortcuts, no "works on my machine"
- **Modern C++ baseline** — C++17 minimum, C++20/23 where they improve clarity
- **Value semantics by default** — copy, move, compare; references/pointers are the exception
- **const correctness** — if it doesn't mutate, it's `const`
- **Compile-time over runtime** — `constexpr`, `static_assert`, `concepts`

## Compiler Warnings

```cmake
target_compile_options(${PROJECT_NAME} PRIVATE
    $<$<CXX_COMPILER_ID:MSVC>:/W4 /WX /permissive->
    $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall -Wextra -Wpedantic -Werror
        -Wshadow -Wconversion -Wnon-virtual-dtor -Wold-style-cast>
)
```

## Definition of Done

- [ ] Zero warnings under `-Wall -Wextra -Wpedantic -Werror`
- [ ] All tests + sanitizers pass (ASan, UBSan, TSan)
- [ ] `clang-tidy` reports zero findings
- [ ] RAII used for all resources, no raw `new`/`delete`
- [ ] `const` correctness enforced, exception safety documented
