New WG21 papers are available. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.
Document number: N4487
Date: 2015-04-28
Constexpr Lambda
by Faisal Vali, Ville Voutilainen, Gabriel Dos Reis
Excerpt:
This proposal suggests allowing lambda-expressions in constant expressions, removing an existing restriction. The authors propose that certain lambda-expressions and operations on certain closure objects be allowed to appear within constant expressions. In doing so, we also propose that a closure type be considered a literal type if the type of each of its data-members is a literal type; and, that if the
constexpr
specifier is omitted within the lambda-declarator, that the generated function call operator beconstexpr
if it would satisfy the requirements of aconstexpr
function (similar to theconstexpr
inference that already occurs for implicitly defined constructors and the assignment operator functions).
Add a Comment
Comments are closed.