From: Steven Watanabe (steven_at_[hidden])
Date: 2007-04-02 18:15:58


AMDG

Martin Schulz <Martin.Schulz <at> synopsys.com> writes:

> template<class Archive,class Unit,class Y>
> inline void serialize(Archive& ar,boost::units::quantity<Unit,Y>&
> q,const unsigned int version)
> {
> static std::string s1=stringify(unit<Dim,System>());
> std::string s2(1);
>
> ar & q.value();
> ar & s2;
>
> if (s1!=s2) throw incompatibilty_exception(q, s);
> }

It would be better to make an archive that
checks the types of all the elements.

In Christ,
Steven Watanabe