1 #ifndef PROTON_CODEC_VECTOR_HPP 2 #define PROTON_CODEC_VECTOR_HPP 25 #include "./encoder.hpp" 26 #include "./decoder.hpp" 35 template <
class T,
class A>
encoder& operator<<(encoder& e, const std::vector<T, A>& x) {
36 return e << encoder::array(x, internal::type_id_of<T>::value);
40 template <
class A>
encoder& operator<<(encoder& e, const std::vector<value, A>& x) {
return e << encoder::list(x); }
43 template <
class A>
encoder& operator<<(encoder& e, const std::vector<scalar, A>& x) {
return e << encoder::list(x); }
46 template <
class A,
class K,
class T>
47 encoder& operator<<(encoder& e, const std::vector<std::pair<K,T>, A>& x) {
return e << encoder::map(x); }
53 template <
class A,
class K,
class T>
decoder&
operator>>(
decoder& d, std::vector<std::pair<K, T> , A>& x) {
return d >> decoder::pair_sequence(x); }
58 #endif // PROTON_CODEC_VECTOR_HPP Experimental - Stream-like encoder from C++ values to AMQP bytes.
Definition: encoder.hpp:47
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:203
The main Proton namespace.
Definition: annotation_key.hpp:30
Experimental - Stream-like decoder from AMQP bytes to C++ values.
Definition: decoder.hpp:53