-marshall& operator<<(marshall &, bool);
-marshall& operator<<(marshall &, uint32_t);
-marshall& operator<<(marshall &, int32_t);
-marshall& operator<<(marshall &, uint8_t);
-marshall& operator<<(marshall &, int8_t);
-marshall& operator<<(marshall &, uint16_t);
-marshall& operator<<(marshall &, int16_t);
-marshall& operator<<(marshall &, uint64_t);
-marshall& operator<<(marshall &, const std::string &);
-
-template <class A, typename I=void>
-struct is_enumerable : std::false_type {};
-
-template<class A> struct is_enumerable<A,
- decltype(std::declval<A&>().cbegin(), std::declval<A&>().cend(), void())
-> : std::true_type {};
-
-template <class A> typename std::enable_if<is_enumerable<A>::value, marshall>::type &
-operator<<(marshall &m, const A &x) {
- m << (unsigned int) x.size();
- for (const auto &a : x)
- m << a;
- return m;
-}
-
-template <class A, class B> marshall &
-operator<<(marshall &m, const std::pair<A,B> &d) {
- return m << d.first << d.second;
-}
-
-template<typename E>
-using enum_type_t = typename std::enable_if<std::is_enum<E>::value, typename std::underlying_type<E>::type>::type;
-template<typename E> constexpr inline enum_type_t<E> from_enum(E e) noexcept { return (enum_type_t<E>)e; }
-template<typename E> constexpr inline E to_enum(enum_type_t<E> value) noexcept { return (E)value; }
-
-template <class E> typename std::enable_if<std::is_enum<E>::value, marshall>::type &
-operator<<(marshall &m, E e) {
- return m << from_enum(e);
-}
-
-class unmarshall;
-
-unmarshall& operator>>(unmarshall &, bool &);
-unmarshall& operator>>(unmarshall &, uint8_t &);
-unmarshall& operator>>(unmarshall &, int8_t &);
-unmarshall& operator>>(unmarshall &, uint16_t &);
-unmarshall& operator>>(unmarshall &, int16_t &);
-unmarshall& operator>>(unmarshall &, uint32_t &);
-unmarshall& operator>>(unmarshall &, int32_t &);
-unmarshall& operator>>(unmarshall &, size_t &);
-unmarshall& operator>>(unmarshall &, uint64_t &);
-unmarshall& operator>>(unmarshall &, int64_t &);
-unmarshall& operator>>(unmarshall &, std::string &);
-template <class E> typename std::enable_if<std::is_enum<E>::value, unmarshall>::type &
-operator>>(unmarshall &u, E &e);
-