On Thu, Nov 10, 2022 at 08:07:25AM -1000, Jason Merrill wrote:
> On 11/9/22 15:56, Marek Polacek wrote:
> > This patch extends -Wdangling-reference to also warn for
> >
> >auto v = std::minmax(1, 2);
> >
> > which dangles because this overload of std::minmax returns
> > a std::pair where the
On 11/9/22 15:56, Marek Polacek wrote:
This patch extends -Wdangling-reference to also warn for
auto v = std::minmax(1, 2);
which dangles because this overload of std::minmax returns
a std::pair where the two references are
bound to the temporaries created for the arguments of std::minmax.
T
This patch extends -Wdangling-reference to also warn for
auto v = std::minmax(1, 2);
which dangles because this overload of std::minmax returns
a std::pair where the two references are
bound to the temporaries created for the arguments of std::minmax.
This is a common footgun, also described at