Boost logo

Boost Users :

From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2006-09-27 15:01:12


"Johan Nilsson" <r.johan.nilsson_at_[hidden]> skrev i meddelandet
news:efdm0b$52f$1_at_sea.gmane.org...

[snip]

>
> I find the latter a bit verbose to use, but I guess simple wrappers could
> be
> added:
>
> ----
> template<...>
> std::basic_istream<...>& operator>>(std::basic_istream<...>& istr,
> time_of_day& tod)
> {
> time_duration td;
> istr >> tod;

Well, that was obviously a typo. Should be:

    time_duration td;
    istr >> td;
    tod = td; // might throw
    return istr;
}

/ Johan


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