1 #ifndef PROTON_CODEC_LIST_HPP
2 #define PROTON_CODEC_LIST_HPP
25 #include "./encoder.hpp"
26 #include "./decoder.hpp"
35 template <
class T,
class A>
36 encoder& operator<<(encoder& e, const std::list<T, A>& x) {
37 return e << encoder::array(x, internal::type_id_of<T>::value);
42 encoder& operator<<(encoder& e, const std::list<value, A>& x) {
return e << encoder::list(x); }
46 encoder& operator<<(encoder& e, const std::list<scalar, A>& x) {
return e << encoder::list(x); }
50 template <
class A,
class K,
class T>
51 encoder& operator<<(encoder& e, const std::list<std::pair<K,T>, A>& x) {
return e << encoder::map(x); }
57 template <
class A,
class K,
class T>
decoder&
operator>>(
decoder& d, std::list<std::pair<K, T> , A>& x) {
return d >> decoder::pair_sequence(x); }
62 #endif // PROTON_CODEC_LIST_HPP
Experimental - Stream-like encoder from AMQP bytes to C++ values.
Definition: encoder.hpp:45
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:201
Type traits for mapping between AMQP and C++ types.
Definition: annotation_key.hpp:28
Experimental - Stream-like decoder from AMQP bytes to C++ values.
Definition: decoder.hpp:51