Boost logo

Boost Users :

Subject: Re: [Boost-users] C++ gurus - really dumb question regarding partial speciallization.
From: Robert Ramey (ramey_at_[hidden])
Date: 2012-12-20 11:47:27


Vicente J. Botet Escriba wrote:
>>> // also fails with "too few template parameters" !!!
>>> safe_range1<int> t3;
>>
>> Your template, and all of the partial specializations, have three
>> parameters and no defaults. Partial specialization #1 just states
>> that when int is used as the first argument to safe_range1, it will
>> use that case, but that doesn't change the parameter type.
>>
>>
> You could get something close using template alias (c++11), but of
> course you need to have a different name.

Actually, I figured this out. Thanks for everyone's help.

I was really mixed up about which list of arguments are the ones
which get matched. That is - the ones in the template<....>
vs the list of ones in the struct x<....>. I realise that that
things are the way they are for a reason, but still C++ has
a number of syntax issues which makes it hard to keep in
my head.

Robert Ramey


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