Boost logo

Boost :

Subject: Re: [boost] [Convert] std::isspace requires unsigned #28
From: Glen Fernandes (glen.fernandes_at_[hidden])
Date: 2017-03-21 00:34:19

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...


Boost list run by bdawes at, gregod at, cpdaniel at, john at