Re: RFC: Use std::{min,max} instead of MIN/MAX?

2015-07-11 Thread Marek Polacek
On Fri, Jul 10, 2015 at 03:35:57PM -0400, Trevor Saunders wrote: You can also explicitly pick the specialization you want with e.g. std::maxlong long (x, y); its kind of long, but I can see an argument for the explicitness so I'm not sure how ugly I think it is. Thanks for pointing this out.

RFC: Use std::{min,max} instead of MIN/MAX?

2015-07-10 Thread Marek Polacek
Uros had the idea of using std::min/max instead of our MIN/MAX macros defined in system.h. I thought I would do this cleanup, but very soon I ran into a problem of failed template argument substitution: std::min/max function templates require that both arguments be of the same type:

Re: RFC: Use std::{min,max} instead of MIN/MAX?

2015-07-10 Thread Trevor Saunders
On Fri, Jul 10, 2015 at 03:19:10PM +0200, Marek Polacek wrote: Uros had the idea of using std::min/max instead of our MIN/MAX macros defined in system.h. I thought I would do this cleanup, but very soon I ran into a problem of failed template argument substitution: std::min/max function