Skip to content

Commit 017d0f6

Browse files
committed
Simplifying client template instantiations.
1 parent 7e9df06 commit 017d0f6

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#ifndef CLIENT_TYPES_ROOWQCLE
2+
#define CLIENT_TYPES_ROOWQCLE
3+
4+
// Copyright 2010 Dean Michael Berris.
5+
// Distributed under the Boost Software License, Version 1.0.
6+
// (See accompanying file LICENSE_1_0.txt or copy at
7+
// http://www.boost.org/LICENSE_1_0.txt)
8+
9+
#include "tag_types.hpp"
10+
#include <boost/mpl/joint_view.hpp>
11+
#include <boost/mpl/bind.hpp>
12+
#include <boost/mpl/transform.hpp>
13+
#include <boost/mpl/int.hpp>
14+
15+
namespace mpl = boost::mpl ;
16+
17+
template <unsigned major, unsigned minor>
18+
struct client_adapter {
19+
template <class T1>
20+
struct apply {
21+
typedef boost::network::http::basic_client<T1, major, minor> type;
22+
};
23+
};
24+
25+
typedef
26+
mpl::transform<
27+
tag_types,
28+
client_adapter<1,0>
29+
>::type
30+
client_1_0;
31+
32+
typedef
33+
mpl::transform<
34+
tag_types,
35+
client_adapter<1,1>
36+
>::type
37+
client_1_1;
38+
39+
typedef mpl::joint_view<
40+
client_1_0
41+
, client_1_1
42+
>::type client_types;
43+
44+
#endif /* CLIENT_TYPES_ROOWQCLE */

0 commit comments

Comments
 (0)