MessagePack for C++
msgpack_variant_decl.hpp
Go to the documentation of this file.
1 //
2 // MessagePack for C++ static resolution routine
3 //
4 // Copyright (C) 2015-2016 KONDO Takatoshi
5 //
6 // Distributed under the Boost Software License, Version 1.0.
7 // (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
9 //
10 #ifndef MSGPACK_V1_TYPE_BOOST_MSGPACK_VARIANT_DECL_HPP
11 #define MSGPACK_V1_TYPE_BOOST_MSGPACK_VARIANT_DECL_HPP
12 
13 #if defined(MSGPACK_USE_BOOST)
14 
15 #include "msgpack/versioning.hpp"
19 #include "msgpack/adaptor/ext.hpp"
20 #include "msgpack/adaptor/raw.hpp"
21 
22 #include <string>
23 #include <vector>
24 namespace msgpack {
25 
29 
30 namespace type {
31 
32 template <typename STR, typename BIN, typename EXT>
33 struct basic_variant;
34 
35 template <typename STR, typename BIN, typename EXT>
36 bool operator<(basic_variant<STR, BIN, EXT> const& lhs, basic_variant<STR, BIN, EXT> const& rhs);
37 
38 template <typename STR, typename BIN, typename EXT>
39 bool operator==(basic_variant<STR, BIN, EXT> const& lhs, basic_variant<STR, BIN, EXT> const& rhs);
40 
41 template <typename STR, typename BIN, typename EXT>
42 bool operator!=(basic_variant<STR, BIN, EXT> const& lhs, basic_variant<STR, BIN, EXT> const& rhs);
43 
44 typedef basic_variant<std::string, std::vector<char>, msgpack::type::ext> variant;
45 typedef basic_variant<
46 #if (BOOST_VERSION / 100000) >= 1 && ((BOOST_VERSION / 100) % 1000) >= 53
47  boost::string_ref,
48 #else // (BOOST_VERSION / 100000) >= 1 && ((BOOST_VERSION / 100) % 1000) >= 53
49  std::string,
50 #endif // (BOOST_VERSION / 100000) >= 1 && ((BOOST_VERSION / 100) % 1000) >= 53
52 
53 } // namespace type
54 
56 } // MSGPACK_API_VERSION_NAMESPACE(v1)
58 
59 } // namespace msgpack
60 
61 #endif // MSGPACK_USE_BOOST
62 #endif // MSGPACK_V1_TYPE_BOOST_MSGPACK_VARIANT_DECL_HPP
Definition: raw.hpp:26
Definition: ext.hpp:27
Definition: adaptor_base.hpp:15
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:58
Definition: ext.hpp:119
bool operator==(nil_t const &lhs, nil_t const &rhs)
Definition: nil.hpp:29
bool operator!=(const msgpack::object &x, const msgpack::object &y)
Definition: object.hpp:1044