From a8ce5c380c69539fe0c7c62c397634d9d0c9fde2 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 18 Dec 2020 18:48:46 +0300 Subject: Switch to build2 --- .../tree/binary/boost/boost-archive-insertion.hxx | 177 --------------------- 1 file changed, 177 deletions(-) delete mode 100644 examples/cxx/tree/binary/boost/boost-archive-insertion.hxx (limited to 'examples/cxx/tree/binary/boost/boost-archive-insertion.hxx') diff --git a/examples/cxx/tree/binary/boost/boost-archive-insertion.hxx b/examples/cxx/tree/binary/boost/boost-archive-insertion.hxx deleted file mode 100644 index 4c89104..0000000 --- a/examples/cxx/tree/binary/boost/boost-archive-insertion.hxx +++ /dev/null @@ -1,177 +0,0 @@ -// file : examples/cxx/tree/binary/boost/boost-archive-insertion.cxx -// copyright : not copyrighted - public domain - -#ifndef BOOST_ARCHIVE_INSERTION_HXX -#define BOOST_ARCHIVE_INSERTION_HXX - -#include // std::size_t -#include - -#include -#include - -#include - -namespace xsd -{ - namespace cxx - { - namespace tree - { - // as_size - // - template - inline ostream& - operator<< (ostream& s, ostream_common::as_size x) - { - std::size_t v (static_cast (x.x_)); - s.impl () << v; - return s; - } - - // 8-bit - // - template - inline ostream& - operator<< (ostream& s, ostream_common::as_int8 x) - { - boost::int8_t v (static_cast (x.x_)); - s.impl () << v; - return s; - } - - template - inline ostream& - operator<< (ostream& s, ostream_common::as_uint8 x) - { - boost::uint8_t v (static_cast (x.x_)); - s.impl () << v; - return s; - } - - - // 16-bit - // - template - inline ostream& - operator<< (ostream& s, ostream_common::as_int16 x) - { - boost::int16_t v (static_cast (x.x_)); - s.impl () << v; - return s; - } - - template - inline ostream& - operator<< (ostream& s, ostream_common::as_uint16 x) - { - boost::uint16_t v (static_cast (x.x_)); - s.impl () << v; - return s; - } - - - // 32-bit - // - template - inline ostream& - operator<< (ostream& s, ostream_common::as_int32 x) - { - boost::int32_t v (static_cast (x.x_)); - s.impl () << v; - return s; - } - - template - inline ostream& - operator<< (ostream& s, ostream_common::as_uint32 x) - { - boost::uint32_t v (static_cast (x.x_)); - s.impl () << v; - return s; - } - - - // 64-bit - // - template - inline ostream& - operator<< (ostream& s, ostream_common::as_int64 x) - { - boost::int64_t v (static_cast (x.x_)); - s.impl () << v; - return s; - } - - template - inline ostream& - operator<< (ostream& s, ostream_common::as_uint64 x) - { - boost::uint64_t v (static_cast (x.x_)); - s.impl () << v; - return s; - } - - - // Boolean - // - template - inline ostream& - operator<< (ostream& s, ostream_common::as_bool x) - { - bool v (static_cast (x.x_)); - s.impl () << v; - return s; - } - - - // Floating-point - // - template - inline ostream& - operator<< (ostream& s, ostream_common::as_float32 x) - { - float v (static_cast (x.x_)); - s.impl () << v; - return s; - } - - template - inline ostream& - operator<< (ostream& s, ostream_common::as_float64 x) - { - double v (static_cast (x.x_)); - s.impl () << v; - return s; - } - - - // Insertion of std::basic_string. - // - template - inline ostream& - operator<< (ostream& s, const std::basic_string& x) - { - s.impl () << x; - return s; - } - - - // Insertion of a binary buffer. - // - template - ostream& - operator<< (ostream& s, const buffer& x) - { - // Boost.Serialization needs an lvalue. - // - std::size_t size (x.size()); - s.impl () << size; - s.impl ().save_binary (x.data (), x.size ()); - return s; - } - } - } -} - -#endif // BOOST_ARCHIVE_INSERTION_HXX -- cgit v1.1