1 #ifndef PROTON_CODEC_FORWARD_LIST_HPP
2 #define PROTON_CODEC_FORWARD_LIST_HPP
23 #include "./encoder.hpp"
24 #include "./decoder.hpp"
26 #include <forward_list>
33 template <
class T,
class A>
34 encoder& operator<<(encoder& e, const std::forward_list<T, A>& x) {
35 return e << encoder::array(x, internal::type_id_of<T>::value);
40 encoder& operator<<(encoder& e, const std::forward_list<value, A>& x) {
return e << encoder::list(x); }
44 encoder& operator<<(encoder& e, const std::forward_list<scalar, A>& x) {
return e << encoder::list(x); }
48 template <
class A,
class K,
class T>
49 encoder& operator<<(encoder& e, const std::forward_list<std::pair<K,T>, A>& x) {
return e << encoder::map(x); }
55 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); }
60 #endif // PROTON_CODEC_FORWARD_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