Title
Infinite recursion should hit an implementation limit
Status
open
Section
13.9.2 [temp.inst]
Submitter
Timur Doumler

Created on 2025-07-04.00:00:00 last changed 4 days ago

Messages

Date: 2025-07-26.20:10:53

Suggested resolution:

Change in 13.9.2 [temp.inst] paragraph 16 as follows:

There is an implementation-defined quantity that specifies the limit on the total depth of recursive instantiations (Clause Annex B [implimits]), which could involve more than one template. The result of an infinite recursion in instantiation is undefined.
Date: 2025-07-04.00:00:00

Infinite recursion during template instantiation is specified to yield undefined behavior in 13.9.2 [temp.inst] paragraph 16. However, instantiation should be subject to compile-time implementation limits and not cause runtime undefined behavior.

History
Date User Action Args
2025-07-26 20:10:53adminsetmessages: + msg8045
2025-07-04 00:00:00admincreate