Re: [PATCH] c++: Implement C++23 P0849R8 - auto(x) [PR103049]

2021-11-18 Thread Marek Polacek via Gcc-patches
On Thu, Nov 18, 2021 at 05:36:45PM -0500, Jason Merrill wrote: > On 11/4/21 16:26, Marek Polacek wrote: > > This patch implements P0849R8 which allows auto in a functional cast, > > the result of which is a prvalue. > > > > [expr.type.conv]/1 says that the type is determined by placeholder type >

Re: [PATCH] c++: Implement C++23 P0849R8 - auto(x) [PR103049]

2021-11-18 Thread Jason Merrill via Gcc-patches
On 11/4/21 16:26, Marek Polacek wrote: This patch implements P0849R8 which allows auto in a functional cast, the result of which is a prvalue. [expr.type.conv]/1 says that the type is determined by placeholder type deduction. We only accept 'auto', not 'decltype(auto)' -- that the type shall be

[PATCH] c++: Implement C++23 P0849R8 - auto(x) [PR103049]

2021-11-04 Thread Marek Polacek via Gcc-patches
This patch implements P0849R8 which allows auto in a functional cast, the result of which is a prvalue. [expr.type.conv]/1 says that the type is determined by placeholder type deduction. We only accept 'auto', not 'decltype(auto)' -- that the type shall be auto comes from [dcl.type.auto.deduct].