![]() |
Boost : |
Subject: Re: [boost] [Review:Algorithms] Order of args to clamp
From: Olaf van der Spek (ml_at_[hidden])
Date: 2011-09-26 07:02:20
On Mon, Sep 26, 2011 at 8:30 AM, Christian Holmquist
<c.holmquist_at_[hidden]> wrote:
> Sometimes types unfortunately have implicit conversion, and if the compiler
> finds them (I guess that what's common_type deduces?),I might end up with a
> bogus expression that unfortunately compiles.
Could you give a concrete example (with 3 type clamp)?
> Since std::min/max takes one type (for good reasons), I don't see why clamp
> all of a sudden should be different.
What are those good reasons?
Olaf
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk