32#ifdef _QX_ENABLE_BOOST
33#ifndef _QX_SERIALIZE_QDATASTREAM_BOOST_OPTIONAL_H_
34#define _QX_SERIALIZE_QDATASTREAM_BOOST_OPTIONAL_H_
47#include <QtCore/qdatastream.h>
50QDataStream &
operator<< (QDataStream & stream,
const boost::optional<T> & t)
52 qint8 iHasData = (t ? 1 : 0);
54 if (t) { stream << (* t); }
59QDataStream &
operator>> (QDataStream & stream, boost::optional<T> & t)
63 if (iHasData) { t = T(); stream >> (* t); }
64 else { t = boost::none; }
QDataStream & operator<<(QDataStream &stream, const boost::optional< T > &t)
QDataStream & operator>>(QDataStream &stream, boost::optional< T > &t)