Re: [C++ Patch] Do not warn about [[nodiscard]] applied to a constructor

2019-08-01 Thread Jason Merrill
OK. On Thu, Aug 1, 2019 at 12:36 PM Paolo Carlini wrote: > > Hi, > > in Cologne, during the presentation of P1771R0, Per Sommerlad pointed > out that apparently GCC was already almost doing the right thing - it > accepts [[nodiscard]] on a constructor and then a warning is emitted in > the releva

[C++ Patch] Do not warn about [[nodiscard]] applied to a constructor

2019-08-01 Thread Paolo Carlini
Hi, in Cologne, during the presentation of P1771R0, Per Sommerlad pointed out that apparently GCC was already almost doing the right thing - it accepts [[nodiscard]] on a constructor and then a warning is emitted in the relevant potentially dangerous situations - but it does first emit a warn