On Wed, Nov 28, 2012 at 10:05 AM, Robert Jones
On Wed, Nov 28, 2012 at 5:56 PM, Jeffrey Lee Hellrung, Jr. < jeffrey.hellrung@gmail.com> 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!
Probably won't work :) Sounds like your initial use case *should* be okay (seems to work on clang and msvc) and your version of gcc is incorrect in rejecting it. Consider reducing your use case down to be Boost-independent and filing a bug with gcc. - Jeff