[expr.type.conv]

# 7 Expressions [[expr]](./#expr)

## 7.6 Compound expressions [[expr.compound]](expr.compound#expr.type.conv)

### 7.6.1 Postfix expressions [[expr.post]](expr.post#expr.type.conv)

#### 7.6.1.4 Explicit type conversion (functional notation) [expr.type.conv]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/expressions.tex#L4051)

A [](dcl.type.simple "9.2.9.3 Simple type specifiers [dcl.type.simple]")[*simple-type-specifier*](dcl.type.simple#nt:simple-type-specifier "9.2.9.3 Simple type specifiers [dcl.type.simple]") or[](temp.res "13.8 Name resolution [temp.res]")[*typename-specifier*](temp.res.general#nt:typename-specifier "13.8.1 General [temp.res.general]") followed
by a parenthesized optional [*expression-list*](expr.post.general#nt:expression-list "7.6.1.1 General [expr.post.general]") or
by a [*braced-init-list*](dcl.init.general#nt:braced-init-list "9.5.1 General [dcl.init.general]") (the initializer)
constructs a value of the specified type
given the initializer[.](#1.sentence-1)

If the type is a placeholder
for a deduced class type,
it is replaced by the return type
of the function selected by overload resolution
for [class template deduction](over.match.class.deduct "12.2.2.9 Class template argument deduction [over.match.class.deduct]") for the remainder of this subclause[.](#1.sentence-2)

Otherwise, if the type contains a placeholder type,
it is replaced by the type
determined by placeholder type deduction ([[dcl.type.auto.deduct]](dcl.type.auto.deduct "9.2.9.7.2 Placeholder type deduction"))[.](#1.sentence-3)

Let T denote the resulting type[.](#1.sentence-4)

Then:

- [(1.1)](#1.1)

  If the initializer is a parenthesized single expression,
the type conversion expression is equivalent
to the corresponding cast
expression ([[expr.cast]](expr.cast "7.6.3 Explicit type conversion (cast notation)"))[.](#1.1.sentence-1)

- [(1.2)](#1.2)

  Otherwise, if T is cv void,
the initializer shall be () or {} (after pack expansion, if any), and
the expression is a prvalue of type void that performs no initialization[.](#1.2.sentence-1)

- [(1.3)](#1.3)

  Otherwise, if T is a reference type,
the expression has the same effect as
direct-initializing an invented variable t of type T from
the initializer and then
using t as the result of the expression;
the result is an lvalue ifT is an lvalue reference type or
an rvalue reference to function type and
an xvalue otherwise[.](#1.3.sentence-1)

- [(1.4)](#1.4)

  Otherwise,
the expression is a prvalue of type T whose result object is direct-initialized ([[dcl.init]](dcl.init "9.5 Initializers"))
with the initializer[.](#1.4.sentence-1)

If the initializer is a parenthesized optional [*expression-list*](expr.post.general#nt:expression-list "7.6.1.1 General [expr.post.general]"),T shall not be an array type[.](#1.sentence-6)

[*Example [1](#example-1)*: struct A {};void f(A&); // #1void f(A&&); // #2 A& g();void h() { f(g()); // calls #1 f(A(g())); // calls #2 with a temporary object f(auto(g())); // calls #2 with a temporary object} â *end example*]
