Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Very deep template instantiation stacks

Open
#1,276 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp
Domain
compilers

Research direction

Start with examples/hello_world.cpp and reproduce the reported template-depth measurements on the linked Compiler Explorer cases for Clang 17.0.1 and GCC 13.2. Then inspect __meta.hpp to identify which instantiations contribute to the depth. Done would require a clearly scoped, validated reduction or a documented explanation of why the depth cannot be reduced.

Written by the indexing model from the issue text.

Description

enhancement P2

Just "hello world" example requires template depth limit be 229 for Clang 17.0.1 and 157 for GCC 13.2: https://gcc.godbolt.org/z/K45fxG75T. I think this is too much and cannot work in real world production code.
Do you have ideas what could be improved in this sense and why there are so deep template instantiation stacks?
Maybe something could be optimized in __meta.hpp?

Dominant language
C++
Stars
2.4k
Forks
270
Avg merge
2d 17h
Merged PRs (30d)
37

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA/stdexec

All issues in NVIDIA/stdexec

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.