Boost logo

Boost :

From: Matthew Vogt (mattvogt_at_[hidden])
Date: 2005-03-11 17:07:03


Jonathan Turkanis wrote:

>>struct some_filter // details ommitted
>>{
>> template<typename Source>
>> character::value_type get(Source& src)
>> {
>> character c;
>> if (c = boost::io::get(src))
>> {
>> // c is good()
>> };
>> return c;
>> }
>>};
>
>
> I'm not sure how this works; within some_filter get, do you have to use
> c.value()?
>

No, provided you give the character class all the operators defined for char
comparison, etc.

> I'm going to try using char converion and a safe-bool conversion, except on
> Borland where the safe-bool conversion will be a plain conversion. If it doesn't
> work, I''ll go back to good().
>
> Thanks for all your suggestions.
>
Suggestions are cheap :)

Matt


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