Boost logo

Boost :

From: Neal Becker (ndbecker2_at_[hidden])
Date: 2007-11-13 07:37:57


BTW, I posted this before:

namespace boost { namespace serialization {
    template<class T>
    struct implementation_level<std::complex<T> >
    {
      typedef mpl::integral_c_tag tag;
      // typedef mpl::int_<primitive_type> type;
      typedef mpl::int_<object_serializable> type;
      BOOST_STATIC_CONSTANT(
                            int,
                            value = implementation_level::type::value
                            );
    };

    template<class T>
    struct tracking_level<std::complex<T> >
    {
      typedef mpl::integral_c_tag tag;
      typedef mpl::int_<track_never> type;
      BOOST_STATIC_CONSTANT(
                            int,
                            value = tracking_level::type::value
                            );
      
    };

    template<class Archive, class T>
    inline void serialize (Archive &ar, std::complex<T>& z, const
                           unsigned int file_version) {
      ar & boost::serialization::make_nvp ("real", real(z));
      ar & boost::serialization::make_nvp ("imag", imag(z));
    }

  }
}


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