C++ (Qt)template<class Stream, class T>void ReadWrite(Stream &strm, T *data); template<class Stream, class T, int>void ReadWrite(Stream &strm, T *data) { qDebug() << 1;} template<class Stream, class T, int, int>void ReadWrite(Stream &strm, T *data) { qDebug() << 2;}
C++ (Qt)int strm, data;ReadWrite<int, int, 0>(strm, &data);ReadWrite<int, int, 0, 0>(strm, &data);
/// Сохранение отчета. Инициализируем лоадер, вызываем сохранение...bool uoReportDoc::saveToFile(QString path, uoRptStoreFormat stFormat, uoReportSelection* sel){ bool retVal = false; if (stFormat == uoRsf_Unknown) { qWarning() << tr("no define store format"); return false; } uoReportLoader* loader = uoReportLoader::getLoader(stFormat); if (!loader) { qWarning() << tr("Can not create loader"); return false; } loader->setFileName(path); if (!loader->initFO(false)){ qWarning() << loader->getLastError(); } else { flush(loader, sel); } loader->finalize(); delete loader; return retVal;}
C++ (Qt)ar & g.degrees;
C++ (Qt)ar <> g.degrees;
C++ (Qt)ar <<>> g.degrees;
Cfriend class boost::serialization::access;template<class Archive>void serialize(Archive & ar, const unsigned int version){ ar & degrees; ar & minutes; ar & seconds;}