Chris@16
|
1 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
2 /// \file any.hpp
|
Chris@16
|
3 /// Contains definition the detail::any type
|
Chris@16
|
4 //
|
Chris@16
|
5 // Copyright 2012 Eric Niebler. Distributed under the Boost
|
Chris@16
|
6 // Software License, Version 1.0. (See accompanying file
|
Chris@16
|
7 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
8
|
Chris@16
|
9 #ifndef BOOST_PROTO_DETAIL_ANY_HPP_EAN_18_07_2012
|
Chris@16
|
10 #define BOOST_PROTO_DETAIL_ANY_HPP_EAN_18_07_2012
|
Chris@16
|
11
|
Chris@16
|
12 #include <boost/preprocessor/facilities/intercept.hpp>
|
Chris@16
|
13 #include <boost/preprocessor/repetition/repeat.hpp>
|
Chris@16
|
14 #include <boost/preprocessor/repetition/enum_params.hpp>
|
Chris@16
|
15 #include <boost/proto/proto_fwd.hpp>
|
Chris@16
|
16
|
Chris@16
|
17 namespace boost { namespace proto
|
Chris@16
|
18 {
|
Chris@16
|
19 namespace detail
|
Chris@16
|
20 {
|
Chris@16
|
21 namespace anyns
|
Chris@16
|
22 {
|
Chris@16
|
23 ////////////////////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
24 struct any
|
Chris@16
|
25 {
|
Chris@16
|
26 template<typename T> any(T const &) {}
|
Chris@16
|
27 any operator=(any);
|
Chris@16
|
28 any operator[](any);
|
Chris@16
|
29 #define M0(Z, N, DATA) any operator()(BOOST_PP_ENUM_PARAMS_Z(Z, N, any BOOST_PP_INTERCEPT));
|
Chris@16
|
30 BOOST_PP_REPEAT(BOOST_PROTO_MAX_ARITY, M0, ~)
|
Chris@16
|
31 #undef M0
|
Chris@16
|
32
|
Chris@16
|
33 template<typename T>
|
Chris@16
|
34 operator T &() const volatile;
|
Chris@16
|
35
|
Chris@16
|
36 any operator+();
|
Chris@16
|
37 any operator-();
|
Chris@16
|
38 any operator*();
|
Chris@16
|
39 any operator&();
|
Chris@16
|
40 any operator~();
|
Chris@16
|
41 any operator!();
|
Chris@16
|
42 any operator++();
|
Chris@16
|
43 any operator--();
|
Chris@16
|
44 any operator++(int);
|
Chris@16
|
45 any operator--(int);
|
Chris@16
|
46
|
Chris@16
|
47 friend any operator<<(any, any);
|
Chris@16
|
48 friend any operator>>(any, any);
|
Chris@16
|
49 friend any operator*(any, any);
|
Chris@16
|
50 friend any operator/(any, any);
|
Chris@16
|
51 friend any operator%(any, any);
|
Chris@16
|
52 friend any operator+(any, any);
|
Chris@16
|
53 friend any operator-(any, any);
|
Chris@16
|
54 friend any operator<(any, any);
|
Chris@16
|
55 friend any operator>(any, any);
|
Chris@16
|
56 friend any operator<=(any, any);
|
Chris@16
|
57 friend any operator>=(any, any);
|
Chris@16
|
58 friend any operator==(any, any);
|
Chris@16
|
59 friend any operator!=(any, any);
|
Chris@16
|
60 friend any operator||(any, any);
|
Chris@16
|
61 friend any operator&&(any, any);
|
Chris@16
|
62 friend any operator&(any, any);
|
Chris@16
|
63 friend any operator|(any, any);
|
Chris@16
|
64 friend any operator^(any, any);
|
Chris@16
|
65 friend any operator,(any, any);
|
Chris@16
|
66 friend any operator->*(any, any);
|
Chris@16
|
67
|
Chris@16
|
68 friend any operator<<=(any, any);
|
Chris@16
|
69 friend any operator>>=(any, any);
|
Chris@16
|
70 friend any operator*=(any, any);
|
Chris@16
|
71 friend any operator/=(any, any);
|
Chris@16
|
72 friend any operator%=(any, any);
|
Chris@16
|
73 friend any operator+=(any, any);
|
Chris@16
|
74 friend any operator-=(any, any);
|
Chris@16
|
75 friend any operator&=(any, any);
|
Chris@16
|
76 friend any operator|=(any, any);
|
Chris@16
|
77 friend any operator^=(any, any);
|
Chris@16
|
78 };
|
Chris@16
|
79 }
|
Chris@16
|
80
|
Chris@16
|
81 using anyns::any;
|
Chris@16
|
82 }
|
Chris@16
|
83 }}
|
Chris@16
|
84
|
Chris@16
|
85 #endif
|