|
Boost Users : |
Subject: Re: [Boost-users] [serialization] When do I need to overload operators
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2010-09-19 10:27:50
Sean Farrow wrote:
> Hi:
>
> In trhe demo.cpp file in the Serialization examples, the << and >>
> operators are made friends of the gps_position class and are overridden.
> In what circumstances do I need to override these operators and when can
> I get away with just writing a Serialize template function.
Serialization only involves the serialize template methods. The
insertion/extraction operator overloads are only used in the example to
be able to print the states to the console for you to verify that
serialization worked properly.
Jeff
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