Created on 2010-08-01.00:00:00 last changed 130 months ago
[Voted into the WP at the March, 2011 meeting.]
Proposed resolution (January, 2011):
Add the following bullet in 7.7 [expr.const] paragraph 2:
an invocation of a constexpr function or a constexpr constructor that would exceed the implementation-defined recursion limit (see annex Clause Annex B [implimits]);
Notes from the November, 2010 meeting:
The CWG was of mixed opinion as to whether an infinite recursion in a constexpr function should be ill-formed or simply render an expression non-constant.
It is not clear what happens when a program violates the limits on constexpr function recursion in a context that does not require a constant expression. For example,
constexpr int f(int i) { return f(i); }
const int i = f(1); // error, undefined behavior, or dynamic initialization?
(Presumably the “within its resource limits” caveat of 4.1 [intro.compliance] paragraph 2 would effectively result in undefined behavior in a context that required a constant expression.)
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: fdis -> c++11 |
2011-04-10 00:00:00 | admin | set | messages: + msg3316 |
2011-04-10 00:00:00 | admin | set | status: tentatively ready -> fdis |
2011-02-28 00:00:00 | admin | set | status: review -> tentatively ready |
2010-11-29 00:00:00 | admin | set | messages: + msg3078 |
2010-11-29 00:00:00 | admin | set | messages: + msg3077 |
2010-11-29 00:00:00 | admin | set | status: open -> review |
2010-08-01 00:00:00 | admin | create |