
Cpp Templates
Helps you read C++ template errors from the bottom up, migrate from SFINAE to concepts, and figure out why your compile times are slow. It covers requires-clauses, concept constraints, and profiling instantiation depth with Templight or ClangBuildAnalyzer. The skill is practical about the SFINAE versus concepts tradeoff: concepts give cleaner errors and faster compiles but need C++20. Good for when you're staring at a 300-line error message or watching your build crawl because of recursive template instantiations. Also includes flags like -ftemplate-backtrace-limit to cut the noise.
- skills.sh installs
- 574
- GitHub stars
- 279
- last updated
- Aug 21, 2026
Install
$ npx -y skills add mohitmishra786/low-level-dev-skills --skill cpp-templates --agent claude-codeInstalls into .claude/skills of the current project.
Files
C++ Templates
Purpose
Guide agents through reading and fixing template error messages, using concepts as cleaner constraints, understanding SFINAE vs concepts trade-offs, and profiling template instantiation depth and compile times with Templight.
Triggers
- "How do I read this massive C++ template error?"
- "How do I use concepts to constrain a template?"
- "What's the difference between SFINAE and concepts?"
- "My templates make compilation very slow"
- "How do I write a requires-clause?"
- "How do I profile template instantiation times?"
Workflow
1. Reading template error messages
Template errors print full instantiation chains. Strategy: read from the bottom up.
prog.cpp:25:5: error: no matching function for call to 'sort'
std::sort(v.begin(), v.end());
^~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:4869:5: note: candidate:
template<class _RAIter>
void std::sort(_RAIter, _RAIter)
note: template argument deduction/substitution failed:
prog.cpp:25:5: note: 'MyType' is not a valid type for this template
^~~~~~~~
Sponsors
Details
- Repository
- github.com/mohitmishra786/low-level-dev-skills
- Categories
- Documentation, Debugging
- First seen
- Jun 3, 2026
More from mohitmishra786/low-level-dev-skills
All 54- Rustc Basics567
- Rust Cross565
- Wasm Emscripten559
- Zig Debugging555
- Zig Build System552
- Zig Cross536
- Wasm Wasmtime532
- Zig Cinterop524
- Cmake1.8K
- Static Analysis1.2K
- Gdb1K
- Llvm948
- Sanitizers895
- Core Dumps828
- Linux Perf814
- Clang789
- Cross Gcc742
- Gcc741
- Valgrind740
- Flamegraphs728
- Assembly X86724
- Strace Ltrace711
- Cpu Cache Opt709
- Assembly Arm707