Boost logo

Boost :

Subject: Re: [boost] [Convert] std::isspace requires unsigned #28
From: Vladimir Batov (Vladimir.Batov_at_[hidden])
Date: 2017-03-21 00:42:04


Template specializations stop type propagations. OTOH overloads might be
funny in that regard... I think.

On 2017-03-21 11:34, Glen Fernandes via Boost wrote:
> On Mon, Mar 20, 2017 at 8:26 PM, Vladimir Batov via Boost wrote:
>> OK, I guess function specifications are much shorter. Phew. Still.
>> What do I
>> do with No.2?
>>
>> template<typename char_type> bool is_space(char_type);
>>
>> template<> bool is_space (unsigned char c)...
>> template<> bool is_space (char c)...
>> template<> bool is_space (unsigned wchar_t c)...
>> template<> bool is_space (wchar_t c)...
>>
>
> Hi Vladimir,
>
> Why one function template that you then specialize four times? i.e.
> Why not just four functions?
>
> bool is_space(unsigned char c)
> bool is_space(char c)
> bool is_space(unsigned wchar_t c)
> bool is_space(wchar_t c)
>
> Unless I'm missing some context...
>
> Glen
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk