Boost logo

Boost Users :

Subject: Re: [Boost-users] [counting_range] why?
From: Robert Jones (robertgbjones_at_[hidden])
Date: 2012-11-28 13:05:30


On Wed, Nov 28, 2012 at 5:56 PM, Jeffrey Lee Hellrung, Jr. <
jeffrey.hellrung_at_[hidden]> wrote:

>
> Looks like gcc is instantiating the unary overloads of counting_range
> (with template parameter int) even though you're supplying 2
> arguments...I'm not sure if that is standard behavior or not; MSVC9 seems
> to do okay with it.
>
> Is this is a real hindrance or merely curiosity?
>
>
More curiosity now, as I can do what I need to do, but where I started from
was...

counting_range<unsigned>( 0, 3 )

So using arguments of type int, in a range of type unsigned, which doesn't
work. I can of course do

counting_range( 0U, 3U )

to get the same effect, but it's a bit inelegant!

I haven't investigated what counting_range( 0U, 3 ) does!

Thx, Rob.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net