[cfe-dev] Asymmetric lower_bound

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Aug 16 15:19:14 PDT 2010


On Aug 16, 2010, at 2:40 PM, Howard Hinnant wrote:
> 
> The LWG has consistently affirmed over the years that lower_bound and upper_bound tolerate asymmetric compares (but in opposite senses).
> 
>  lower_bound only requires:
> 
>     *j < value or comp(*j, value)
> 
>  upper_bound only requires:
> 
>     (value < *j) or comp(value, *j)
> 
> -Howard

Thanks,

I guess we will have to keep the other operator< around for MSVC's sake.

/jakob





More information about the cfe-dev mailing list