1 #ifndef PROTON_CODEC_FORWARD_LIST_HPP 2 #define PROTON_CODEC_FORWARD_LIST_HPP 29 #include <forward_list> 36 template <
class T,
class A>
37 encoder& operator<<(encoder& e, const std::forward_list<T, A>& x) {
38 return e << encoder::array(x, internal::type_id_of<T>::value);
43 encoder& operator<<(encoder& e, const std::forward_list<value, A>& x) {
return e << encoder::list(x); }
47 encoder& operator<<(encoder& e, const std::forward_list<scalar, A>& x) {
return e << encoder::list(x); }
51 template <
class A,
class K,
class T>
52 encoder& operator<<(encoder& e, const std::forward_list<std::pair<K,T>, A>& x) {
return e << encoder::map(x); }
58 template <
class A,
class K,
class T>
decoder&
operator>>(
decoder& d, std::forward_list<std::pair<K, T> , A>& x) {
return d >> decoder::pair_sequence(x); }
63 #endif // PROTON_CODEC_FORWARD_LIST_HPP Unsettled API - A stream-like encoder from C++ values to AMQP bytes.
Definition: encoder.hpp:50
Unsettled API - A stream-like decoder from AMQP bytes to C++ values.
internal::enable_if< internal::is_unknown_integer< T >::value, decoder & >::type operator>>(decoder &d, T &i)
operator>> for integer types that are not covered by the standard overrides.
Definition: decoder.hpp:206
Unsettled API - A stream-like encoder from C++ values to AMQP bytes.
The main Proton namespace.
Definition: annotation_key.hpp:33
Unsettled API - A stream-like decoder from AMQP bytes to C++ values.
Definition: decoder.hpp:56