Re: C++ PATCH for c++/91129 - wrong error with binary op in template argument

2019-09-01 Thread Jason Merrill
On 8/29/19 12:36 PM, Marek Polacek wrote: We reject this test with errors like nontype1.C:22:14: error: taking address of rvalue [-fpermissive] 22 | A{}> a2; | ^~~ that happens because for converting "C{}" to int we generate "C::operator int (&TARGET_EXPR )".

C++ PATCH for c++/91129 - wrong error with binary op in template argument

2019-08-29 Thread Marek Polacek
We reject this test with errors like nontype1.C:22:14: error: taking address of rvalue [-fpermissive] 22 | A{}> a2; | ^~~ that happens because for converting "C{}" to int we generate "C::operator int (&TARGET_EXPR )". The second template argument is a binary opera