|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2000-12-04 12:04:53
> Hm, not me. Maybe I'm not clever enough. I changed lexical_cast as you
> suggested and made 'call' a static function.
Oops. :-)
> Worked fine. Next, I
> tried to specialize it:
>
> typedef const char U[];
> template<> string lexical_cast_helper< string, U >::call( const U& arg
> )
> {
> return string( arg );
> }
>
> But my compiler says:
>
> t.cc:39: parameter type `const char (&)[]' includes reference to array
> of unknown bound
Try this:
template<std::size_t N> string lexical_cast_helper<string, char[N]>
{
static std::string call(char const * s)
{
return s;
}
};
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk