Fun with Placeholder Expressions
As stated before, placeholder expressions are intermediate expressions that don't have a type or refer to a value. The most obvious example of these is the name of an overloaded function.
As stated before, placeholder expressions are intermediate expressions that don't have a type or refer to a value. The most obvious example of these is the name of an overloaded function.
For the sake of TLDR, I will start this post off with a brief explanation and the declaration syntax. Then I'll demonstrate how parametric expressions can be used to pass id-expressions which enables users to write more concise code without adding special operators to the language. For this post specifically we'll cover concise forwarding.
Unlike function templates, parametric expressions do not create a type which means that arguments and return "values" do not require a concrete type. We will refer to these typeless entities as placeholder expressions. A placeholder expression is an intermediate part of an expression that, by itself, does not refer to an actual value. The names of parameter packs, overloaded functions as well as the name of parametric expressions themselves are examples of these.
Parametric Expressions are a hygienic macro like language feature proposed for C++.
Check it out! P1221