Imported Upstream version 1.72.0
[platform/upstream/boost.git] / boost / proto / proto_fwd.hpp
1 ///////////////////////////////////////////////////////////////////////////////
2 /// \file proto_fwd.hpp
3 /// Forward declarations of all of proto's public types and functions.
4 //
5 //  Copyright 2008 Eric Niebler. Distributed under the Boost
6 //  Software License, Version 1.0. (See accompanying file
7 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8
9 #ifndef BOOST_PROTO_FWD_HPP_EAN_04_01_2005
10 #define BOOST_PROTO_FWD_HPP_EAN_04_01_2005
11
12 #include <cstddef>
13 #include <climits>
14 #include <boost/config.hpp>
15 #include <boost/detail/workaround.hpp>
16 #include <boost/preprocessor/cat.hpp>
17 #include <boost/preprocessor/arithmetic/inc.hpp>
18 #include <boost/preprocessor/punctuation/comma.hpp>
19 #include <boost/preprocessor/repetition/enum_params.hpp>
20 #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
21 #include <boost/preprocessor/repetition/enum_trailing_binary_params.hpp>
22 #include <boost/preprocessor/repetition/repeat_from_to.hpp>
23 #include <boost/ref.hpp>
24 #include <boost/mpl/long.hpp>
25 #include <boost/type_traits/remove_const.hpp>
26 #include <boost/type_traits/remove_reference.hpp>
27 #include <boost/mpl/aux_/config/ttp.hpp>
28 #include <boost/utility/result_of.hpp>
29
30 #ifndef BOOST_PROTO_MAX_ARITY
31 # define BOOST_PROTO_MAX_ARITY 10
32 #endif
33
34 #ifndef BOOST_PROTO_MAX_LOGICAL_ARITY
35 # define BOOST_PROTO_MAX_LOGICAL_ARITY 10
36 #endif
37
38 #ifndef BOOST_PROTO_MAX_FUNCTION_CALL_ARITY
39 # define BOOST_PROTO_MAX_FUNCTION_CALL_ARITY BOOST_PROTO_MAX_ARITY
40 #endif
41
42 #if BOOST_PROTO_MAX_ARITY < 3
43 # error BOOST_PROTO_MAX_ARITY must be at least 3
44 #endif
45
46 #if BOOST_PROTO_MAX_FUNCTION_CALL_ARITY > BOOST_PROTO_MAX_ARITY
47 # error BOOST_PROTO_MAX_FUNCTION_CALL_ARITY cannot be larger than BOOST_PROTO_MAX_ARITY
48 #endif
49
50 #ifndef BOOST_PROTO_DONT_USE_PREPROCESSED_FILES
51   #if 10 < BOOST_PROTO_MAX_ARITY ||                                                                 \
52       10 < BOOST_PROTO_MAX_LOGICAL_ARITY ||                                                         \
53       10 < BOOST_PROTO_MAX_FUNCTION_CALL_ARITY
54     #define BOOST_PROTO_DONT_USE_PREPROCESSED_FILES
55   #endif
56 #endif
57
58 #ifndef BOOST_PROTO_BROKEN_CONST_OVERLOADS
59 # if BOOST_WORKAROUND(__GNUC__, == 3) \
60   || BOOST_WORKAROUND(__EDG_VERSION__, BOOST_TESTED_AT(310))
61 #  define BOOST_PROTO_BROKEN_CONST_OVERLOADS
62 # endif
63 #endif
64
65 #ifndef BOOST_PROTO_BROKEN_CONST_QUALIFIED_FUNCTIONS
66 # if BOOST_WORKAROUND(__GNUC__, == 3) \
67   || BOOST_WORKAROUND(__EDG_VERSION__, BOOST_TESTED_AT(310))
68 #  define BOOST_PROTO_BROKEN_CONST_QUALIFIED_FUNCTIONS
69 # endif
70 #endif
71
72 #ifdef BOOST_PROTO_BROKEN_CONST_OVERLOADS
73 # include <boost/utility/enable_if.hpp>
74 # include <boost/type_traits/is_const.hpp>
75 # define BOOST_PROTO_DISABLE_IF_IS_CONST(T)\
76     , typename boost::disable_if_c<boost::is_const<T>::value, boost::proto::detail::undefined>::type * = 0
77 #else
78 # define BOOST_PROTO_DISABLE_IF_IS_CONST(T)
79 #endif
80
81 #ifdef BOOST_PROTO_BROKEN_CONST_QUALIFIED_FUNCTIONS
82 # include <boost/utility/enable_if.hpp>
83 # include <boost/type_traits/is_function.hpp>
84 # define BOOST_PROTO_DISABLE_IF_IS_FUNCTION(T)\
85     , typename boost::disable_if_c<boost::is_function<T>::value, boost::proto::detail::undefined>::type * = 0
86 #else
87 # define BOOST_PROTO_DISABLE_IF_IS_FUNCTION(T)
88 #endif
89
90 #ifndef BOOST_PROTO_BROKEN_PTS
91 # if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
92 #  define BOOST_PROTO_BROKEN_PTS
93 # endif
94 #endif
95
96 #ifdef BOOST_NO_CXX11_DECLTYPE_N3276
97 # // Proto can only use the decltype-based result_of if N3276 has been
98 # // implemented by the compiler.
99 # // See http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2011/n3276.pdf
100 # ifndef BOOST_PROTO_USE_NORMAL_RESULT_OF
101 #  define BOOST_PROTO_USE_NORMAL_RESULT_OF
102 # endif
103 #endif
104
105 // Unless compiler support is there, use tr1_result_of instead of
106 // result_of to avoid the problems addressed by N3276.
107 #ifdef BOOST_PROTO_USE_NORMAL_RESULT_OF
108 # define BOOST_PROTO_RESULT_OF boost::result_of
109 #else
110 # define BOOST_PROTO_RESULT_OF boost::tr1_result_of
111 #endif
112
113 // If we're using the decltype-based result_of, we need to be a bit
114 // stricter about the return types of some functions.
115 #if defined(BOOST_RESULT_OF_USE_DECLTYPE) && defined(BOOST_PROTO_USE_NORMAL_RESULT_OF)
116 # define BOOST_PROTO_STRICT_RESULT_OF
117 # define BOOST_PROTO_RETURN_TYPE_STRICT_LOOSE(X, Y) X
118 #else
119 # define BOOST_PROTO_RETURN_TYPE_STRICT_LOOSE(X, Y) Y
120 #endif
121
122 #ifdef BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING
123 # define BOOST_PROTO_EXTENDED_TEMPLATE_PARAMETERS_MATCHING 
124 #endif
125
126 #if defined(_MSC_VER)
127 # define BOOST_PROTO_DISABLE_MSVC_C4180 __pragma(warning(disable : 4180))  // qualifier applied to function type has no meaning; ignored
128 # define BOOST_PROTO_DISABLE_MSVC_C4522 __pragma(warning(disable : 4522))  // 'class' : multiple assignment operators specified
129 # define BOOST_PROTO_DISABLE_MSVC_C4714 __pragma(warning(disable : 4714))  // function 'xxx' marked as __forceinline not inlined
130 #else
131 # define BOOST_PROTO_DISABLE_MSVC_C4180
132 # define BOOST_PROTO_DISABLE_MSVC_C4522 
133 # define BOOST_PROTO_DISABLE_MSVC_C4714
134 #endif
135
136 namespace boost { namespace proto
137 {
138     namespace detail
139     {
140         typedef char yes_type;
141         typedef char (&no_type)[2];
142
143         template<int N>
144         struct sized_type
145         {
146             typedef char (&type)[N];
147         };
148
149         struct dont_care;
150         struct undefined; // leave this undefined
151         struct not_a_valid_type;
152
153         struct private_type_
154         {
155             private_type_ operator ,(int) const;
156         };
157
158         template<typename T>
159         struct uncvref
160         {
161             typedef T type;
162         };
163
164         template<typename T>
165         struct uncvref<T const>
166         {
167             typedef T type;
168         };
169
170         template<typename T>
171         struct uncvref<T &>
172         {
173             typedef T type;
174         };
175
176         template<typename T>
177         struct uncvref<T const &>
178         {
179             typedef T type;
180         };
181
182         template<typename T, std::size_t N>
183         struct uncvref<T const[N]>
184         {
185             typedef T type[N];
186         };
187
188         template<typename T, std::size_t N>
189         struct uncvref<T (&)[N]>
190         {
191             typedef T type[N];
192         };
193
194         template<typename T, std::size_t N>
195         struct uncvref<T const (&)[N]>
196         {
197             typedef T type[N];
198         };
199
200         struct ignore
201         {
202             ignore()
203             {}
204
205             template<typename T>
206             ignore(T const &)
207             {}
208         };
209
210         /// INTERNAL ONLY
211         ///
212         #define BOOST_PROTO_UNCVREF(X)                                                              \
213             typename boost::proto::detail::uncvref<X>::type                                         \
214             /**/
215
216         struct _default;
217
218         struct not_a_domain;
219         struct not_a_grammar;
220         struct not_a_generator;
221
222         template<typename T, typename Void = void>
223         struct is_transform_;
224
225         template<typename T, typename Void = void>
226         struct is_aggregate_;
227
228         template<typename Expr>
229         struct flat_view;
230     }
231
232     typedef detail::ignore const ignore;
233
234     namespace argsns_
235     {
236         template<typename Arg0>
237         struct term;
238
239         #define M0(Z, N, DATA)                                                                      \
240         template<BOOST_PP_ENUM_PARAMS_Z(Z, N, typename Arg)> struct BOOST_PP_CAT(list, N);          \
241         /**/
242         BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(BOOST_PROTO_MAX_ARITY), M0, ~)
243         #undef M0
244     }
245
246     using namespace argsns_;
247
248     ///////////////////////////////////////////////////////////////////////////////
249     // Operator tags
250     namespace tagns_
251     {
252         namespace tag
253         {
254             struct terminal;
255             struct unary_plus;
256             struct negate;
257             struct dereference;
258             struct complement;
259             struct address_of;
260             struct logical_not;
261             struct pre_inc;
262             struct pre_dec;
263             struct post_inc;
264             struct post_dec;
265
266             struct shift_left;
267             struct shift_right;
268             struct multiplies;
269             struct divides;
270             struct modulus;
271             struct plus;
272             struct minus;
273             struct less;
274             struct greater;
275             struct less_equal;
276             struct greater_equal;
277             struct equal_to;
278             struct not_equal_to;
279             struct logical_or;
280             struct logical_and;
281             struct bitwise_and;
282             struct bitwise_or;
283             struct bitwise_xor;
284             struct comma;
285             struct mem_ptr;
286
287             struct assign;
288             struct shift_left_assign;
289             struct shift_right_assign;
290             struct multiplies_assign;
291             struct divides_assign;
292             struct modulus_assign;
293             struct plus_assign;
294             struct minus_assign;
295             struct bitwise_and_assign;
296             struct bitwise_or_assign;
297             struct bitwise_xor_assign;
298             struct subscript;
299             struct member;
300             struct if_else_;
301             struct function;
302
303             // Fusion tags
304             template<typename Tag, typename Domain> struct proto_expr;
305             template<typename Tag, typename Domain> struct proto_expr_iterator;
306             template<typename Tag, typename Domain> struct proto_flat_view;
307         }
308     }
309
310     using namespace tagns_;
311
312     template<typename Expr>
313     struct tag_of;
314
315     ////////////////////////////////////////////////////////////////////////////////////////////////
316     struct _;
317
318     ////////////////////////////////////////////////////////////////////////////////////////////////
319     struct default_generator;
320
321     struct basic_default_generator;
322
323     template<template<typename> class Extends>
324     struct generator;
325
326     template<template<typename> class Extends>
327     struct pod_generator;
328
329     struct by_value_generator;
330
331     template<typename First, typename Second>
332     struct compose_generators;
333
334     template<typename Generator, typename Void = void>
335     struct wants_basic_expr;
336
337     template<typename Generator>
338     struct use_basic_expr;
339
340     ////////////////////////////////////////////////////////////////////////////////////////////////
341     namespace domainns_
342     {
343         typedef detail::not_a_domain no_super_domain;
344
345         template<
346             typename Generator  = default_generator
347           , typename Grammar    = proto::_
348           , typename Super      = no_super_domain
349         >
350         struct domain;
351
352         struct default_domain;
353
354         struct basic_default_domain;
355
356         struct deduce_domain;
357
358         template<typename Domain, typename Tag, typename Args, bool WantsBasicExpr = wants_basic_expr<typename Domain::proto_generator>::value>
359         struct base_expr;
360     }
361
362     using namespace domainns_;
363
364     ////////////////////////////////////////////////////////////////////////////////////////////////
365     namespace exprns_
366     {
367         template<typename Tag, typename Args, long Arity = Args::arity>
368         struct basic_expr;
369
370         template<typename Tag, typename Args, long Arity = Args::arity>
371         struct expr;
372
373         template<
374             typename Expr
375           , typename Derived
376           , typename Domain = default_domain
377           , long Arity = Expr::proto_arity_c
378         >
379         struct extends;
380
381         template<typename This, typename Fun, typename Domain>
382         struct virtual_member;
383         
384         struct is_proto_expr;
385     }
386     ////////////////////////////////////////////////////////////////////////////////////////////////
387
388     using exprns_::expr;
389     using exprns_::basic_expr;
390     using exprns_::extends;
391     using exprns_::is_proto_expr;
392
393     template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PROTO_MAX_LOGICAL_ARITY, typename G, void)>
394     struct or_;
395
396     template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PROTO_MAX_LOGICAL_ARITY, typename G, void)>
397     struct and_;
398
399     template<typename Grammar>
400     struct not_;
401
402     template<typename Condition, typename Then = _, typename Else = not_<_> >
403     struct if_;
404
405     template<typename Cases, typename Transform = tag_of<_>()>
406     struct switch_;
407
408     template<typename T>
409     struct exact;
410
411     template<typename T>
412     struct convertible_to;
413
414     template<typename Grammar>
415     struct vararg;
416
417     struct pack;
418
419     // Boost bug https://svn.boost.org/trac/boost/ticket/4602
420     //int const N = INT_MAX;
421     int const N = (INT_MAX >> 10);
422
423     namespace context
424     {
425         struct null_context;
426
427         template<typename Expr, typename Context, long Arity = Expr::proto_arity_c>
428         struct null_eval;
429
430         struct default_context;
431
432         template<typename Expr, typename Context, typename Tag = typename Expr::proto_tag, long Arity = Expr::proto_arity_c>
433         struct default_eval;
434
435         template<typename Derived, typename DefaultCtx = default_context>
436         struct callable_context;
437
438         template<typename Expr, typename Context, long Arity = Expr::proto_arity_c>
439         struct callable_eval;
440     }
441
442     using context::null_context;
443     using context::null_eval;
444     using context::default_context;
445     using context::default_eval;
446     using context::callable_context;
447     using context::callable_eval;
448
449     namespace utility
450     {
451         template<typename T, typename Domain = default_domain>
452         struct literal;
453     }
454
455     using utility::literal;
456
457     namespace result_of
458     {
459         template<typename T, typename Domain = default_domain>
460         struct as_expr;
461
462         template<typename T, typename Domain = default_domain>
463         struct as_child;
464
465         template<typename Expr, typename N = mpl::long_<0> >
466         struct child;
467
468         template<typename Expr, long N>
469         struct child_c;
470
471         template<typename Expr>
472         struct left;
473
474         template<typename Expr>
475         struct right;
476
477         template<typename Expr>
478         struct deep_copy;
479
480         template<typename Expr, typename Context>
481         struct eval;
482
483         template<
484             typename Tag
485           , typename DomainOrA0
486             BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(
487                 BOOST_PROTO_MAX_ARITY
488               , typename A
489               , = void BOOST_PP_INTERCEPT
490             )
491           , typename Void = void
492         >
493         struct make_expr;
494
495         template<typename Tag, typename DomainOrSequence, typename SequenceOrVoid = void, typename Void = void>
496         struct unpack_expr;
497
498         template<typename T>
499         struct as_env;
500
501         template<typename Env, typename Tag>
502         struct has_env_var;
503
504         template<typename Env, typename Tag>
505         struct env_var;
506     }
507
508     template<typename T, typename Void = void>
509     struct is_expr;
510
511     template<typename T, typename Void = void>
512     struct is_domain;
513
514     template<typename SubDomain, typename SuperDomain>
515     struct is_sub_domain_of;
516
517     template<typename T, typename Void = void>
518     struct is_env;
519
520     template<typename Expr>
521     struct arity_of;
522
523     template<typename T, typename Void = void>
524     struct domain_of;
525
526     template<typename Expr, typename Grammar>
527     struct matches;
528
529     // Generic expression metafunctions and
530     // grammar elements
531     template<typename Tag, typename Arg>
532     struct unary_expr;
533
534     template<typename Tag, typename Left, typename Right>
535     struct binary_expr;
536
537     template<typename Tag, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PROTO_MAX_ARITY, typename A, void)>
538     struct nary_expr;
539
540     // Specific expression metafunctions and
541     // grammar elements, for convenience
542     template<typename T> struct terminal;
543     template<typename T> struct unary_plus;
544     template<typename T> struct negate;
545     template<typename T> struct dereference;
546     template<typename T> struct complement;
547     template<typename T> struct address_of;
548     template<typename T> struct logical_not;
549     template<typename T> struct pre_inc;
550     template<typename T> struct pre_dec;
551     template<typename T> struct post_inc;
552     template<typename T> struct post_dec;
553
554     template<typename T, typename U> struct shift_left;
555     template<typename T, typename U> struct shift_right;
556     template<typename T, typename U> struct multiplies;
557     template<typename T, typename U> struct divides;
558     template<typename T, typename U> struct modulus;
559     template<typename T, typename U> struct plus;
560     template<typename T, typename U> struct minus;
561     template<typename T, typename U> struct less;
562     template<typename T, typename U> struct greater;
563     template<typename T, typename U> struct less_equal;
564     template<typename T, typename U> struct greater_equal;
565     template<typename T, typename U> struct equal_to;
566     template<typename T, typename U> struct not_equal_to;
567     template<typename T, typename U> struct logical_or;
568     template<typename T, typename U> struct logical_and;
569     template<typename T, typename U> struct bitwise_and;
570     template<typename T, typename U> struct bitwise_or;
571     template<typename T, typename U> struct bitwise_xor;
572     template<typename T, typename U> struct comma;
573     template<typename T, typename U> struct mem_ptr;
574
575     template<typename T, typename U> struct assign;
576     template<typename T, typename U> struct shift_left_assign;
577     template<typename T, typename U> struct shift_right_assign;
578     template<typename T, typename U> struct multiplies_assign;
579     template<typename T, typename U> struct divides_assign;
580     template<typename T, typename U> struct modulus_assign;
581     template<typename T, typename U> struct plus_assign;
582     template<typename T, typename U> struct minus_assign;
583     template<typename T, typename U> struct bitwise_and_assign;
584     template<typename T, typename U> struct bitwise_or_assign;
585     template<typename T, typename U> struct bitwise_xor_assign;
586     template<typename T, typename U> struct subscript;
587     template<typename T, typename U> struct member;
588     template<typename T, typename U, typename V> struct if_else_;
589
590     template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PROTO_MAX_ARITY, typename A, void)>
591     struct function;
592
593     namespace functional
594     {
595         struct left;
596         struct right;
597         struct eval;
598         struct deep_copy;
599
600         template<typename Domain = default_domain>
601         struct as_expr;
602
603         template<typename Domain = default_domain>
604         struct as_child;
605
606         template<typename N = mpl::long_<0> >
607         struct child;
608
609         template<long N>
610         struct child_c;
611
612         struct as_env;
613
614         template<typename Tag>
615         struct has_env_var;
616
617         template<typename Tag>
618         struct env_var;
619
620         template<typename Tag, typename Domain = deduce_domain>
621         struct make_expr;
622
623         template<typename Tag, typename Domain = deduce_domain>
624         struct unpack_expr;
625
626         typedef make_expr<tag::terminal>            make_terminal;
627         typedef make_expr<tag::unary_plus>          make_unary_plus;
628         typedef make_expr<tag::negate>              make_negate;
629         typedef make_expr<tag::dereference>         make_dereference;
630         typedef make_expr<tag::complement>          make_complement;
631         typedef make_expr<tag::address_of>          make_address_of;
632         typedef make_expr<tag::logical_not>         make_logical_not;
633         typedef make_expr<tag::pre_inc>             make_pre_inc;
634         typedef make_expr<tag::pre_dec>             make_pre_dec;
635         typedef make_expr<tag::post_inc>            make_post_inc;
636         typedef make_expr<tag::post_dec>            make_post_dec;
637         typedef make_expr<tag::shift_left>          make_shift_left;
638         typedef make_expr<tag::shift_right>         make_shift_right;
639         typedef make_expr<tag::multiplies>          make_multiplies;
640         typedef make_expr<tag::divides>             make_divides;
641         typedef make_expr<tag::modulus>             make_modulus;
642         typedef make_expr<tag::plus>                make_plus;
643         typedef make_expr<tag::minus>               make_minus;
644         typedef make_expr<tag::less>                make_less;
645         typedef make_expr<tag::greater>             make_greater;
646         typedef make_expr<tag::less_equal>          make_less_equal;
647         typedef make_expr<tag::greater_equal>       make_greater_equal;
648         typedef make_expr<tag::equal_to>            make_equal_to;
649         typedef make_expr<tag::not_equal_to>        make_not_equal_to;
650         typedef make_expr<tag::logical_or>          make_logical_or;
651         typedef make_expr<tag::logical_and>         make_logical_and;
652         typedef make_expr<tag::bitwise_and>         make_bitwise_and;
653         typedef make_expr<tag::bitwise_or>          make_bitwise_or;
654         typedef make_expr<tag::bitwise_xor>         make_bitwise_xor;
655         typedef make_expr<tag::comma>               make_comma;
656         typedef make_expr<tag::mem_ptr>             make_mem_ptr;
657         typedef make_expr<tag::assign>              make_assign;
658         typedef make_expr<tag::shift_left_assign>   make_shift_left_assign;
659         typedef make_expr<tag::shift_right_assign>  make_shift_right_assign;
660         typedef make_expr<tag::multiplies_assign>   make_multiplies_assign;
661         typedef make_expr<tag::divides_assign>      make_divides_assign;
662         typedef make_expr<tag::modulus_assign>      make_modulus_assign;
663         typedef make_expr<tag::plus_assign>         make_plus_assign;
664         typedef make_expr<tag::minus_assign>        make_minus_assign;
665         typedef make_expr<tag::bitwise_and_assign>  make_bitwise_and_assign;
666         typedef make_expr<tag::bitwise_or_assign>   make_bitwise_or_assign;
667         typedef make_expr<tag::bitwise_xor_assign>  make_bitwise_xor_assign;
668         typedef make_expr<tag::subscript>           make_subscript;
669         typedef make_expr<tag::if_else_>            make_if_else;
670         typedef make_expr<tag::function>            make_function;
671
672         struct flatten;
673         struct make_pair;
674         struct first;
675         struct second;
676         struct at;
677         struct pop_front;
678         struct push_front;
679         struct pop_back;
680         struct push_back;
681         struct reverse;
682     }
683
684     typedef functional::flatten     _flatten;
685     typedef functional::make_pair   _make_pair;
686     typedef functional::first       _first;
687     typedef functional::second      _second;
688     typedef functional::at          _at;
689     typedef functional::pop_front   _pop_front;
690     typedef functional::push_front  _push_front;
691     typedef functional::pop_back    _pop_back;
692     typedef functional::push_back   _push_back;
693     typedef functional::reverse     _reverse;
694     typedef functional::eval        _eval;
695     struct _deep_copy;
696
697     typedef functional::make_expr<tag::terminal>           _make_terminal;
698     typedef functional::make_expr<tag::unary_plus>         _make_unary_plus;
699     typedef functional::make_expr<tag::negate>             _make_negate;
700     typedef functional::make_expr<tag::dereference>        _make_dereference;
701     typedef functional::make_expr<tag::complement>         _make_complement;
702     typedef functional::make_expr<tag::address_of>         _make_address_of;
703     typedef functional::make_expr<tag::logical_not>        _make_logical_not;
704     typedef functional::make_expr<tag::pre_inc>            _make_pre_inc;
705     typedef functional::make_expr<tag::pre_dec>            _make_pre_dec;
706     typedef functional::make_expr<tag::post_inc>           _make_post_inc;
707     typedef functional::make_expr<tag::post_dec>           _make_post_dec;
708     typedef functional::make_expr<tag::shift_left>         _make_shift_left;
709     typedef functional::make_expr<tag::shift_right>        _make_shift_right;
710     typedef functional::make_expr<tag::multiplies>         _make_multiplies;
711     typedef functional::make_expr<tag::divides>            _make_divides;
712     typedef functional::make_expr<tag::modulus>            _make_modulus;
713     typedef functional::make_expr<tag::plus>               _make_plus;
714     typedef functional::make_expr<tag::minus>              _make_minus;
715     typedef functional::make_expr<tag::less>               _make_less;
716     typedef functional::make_expr<tag::greater>            _make_greater;
717     typedef functional::make_expr<tag::less_equal>         _make_less_equal;
718     typedef functional::make_expr<tag::greater_equal>      _make_greater_equal;
719     typedef functional::make_expr<tag::equal_to>           _make_equal_to;
720     typedef functional::make_expr<tag::not_equal_to>       _make_not_equal_to;
721     typedef functional::make_expr<tag::logical_or>         _make_logical_or;
722     typedef functional::make_expr<tag::logical_and>        _make_logical_and;
723     typedef functional::make_expr<tag::bitwise_and>        _make_bitwise_and;
724     typedef functional::make_expr<tag::bitwise_or>         _make_bitwise_or;
725     typedef functional::make_expr<tag::bitwise_xor>        _make_bitwise_xor;
726     typedef functional::make_expr<tag::comma>              _make_comma;
727     typedef functional::make_expr<tag::mem_ptr>            _make_mem_ptr;
728     typedef functional::make_expr<tag::assign>             _make_assign;
729     typedef functional::make_expr<tag::shift_left_assign>  _make_shift_left_assign;
730     typedef functional::make_expr<tag::shift_right_assign> _make_shift_right_assign;
731     typedef functional::make_expr<tag::multiplies_assign>  _make_multiplies_assign;
732     typedef functional::make_expr<tag::divides_assign>     _make_divides_assign;
733     typedef functional::make_expr<tag::modulus_assign>     _make_modulus_assign;
734     typedef functional::make_expr<tag::plus_assign>        _make_plus_assign;
735     typedef functional::make_expr<tag::minus_assign>       _make_minus_assign;
736     typedef functional::make_expr<tag::bitwise_and_assign> _make_bitwise_and_assign;
737     typedef functional::make_expr<tag::bitwise_or_assign>  _make_bitwise_or_assign;
738     typedef functional::make_expr<tag::bitwise_xor_assign> _make_bitwise_xor_assign;
739     typedef functional::make_expr<tag::subscript>          _make_subscript;
740     typedef functional::make_expr<tag::if_else_>           _make_if_else;
741     typedef functional::make_expr<tag::function>           _make_function;
742
743     template<typename T>
744     struct is_callable;
745
746     template<typename T>
747     struct is_transform;
748
749     template<typename T>
750     struct is_aggregate;
751
752     #define BOOST_PROTO_UNEXPR() typedef int proto_is_expr_;
753     #define BOOST_PROTO_CALLABLE() typedef void proto_is_callable_;
754     #define BOOST_PROTO_AGGREGATE() typedef void proto_is_aggregate_;
755     #define BOOST_PROTO_USE_BASIC_EXPR() typedef void proto_use_basic_expr_;
756
757     struct callable
758     {
759         BOOST_PROTO_CALLABLE()
760     };
761
762     namespace envns_
763     {
764         struct key_not_found;
765
766         struct empty_env;
767
768         typedef int empty_state;
769
770         template<typename Tag, typename Value, typename Base = empty_env>
771         struct env;
772
773         struct data_type;
774
775         struct transforms_type;
776     }
777
778     using envns_::key_not_found;
779     using envns_::empty_env;
780     using envns_::empty_state;
781     using envns_::env;
782     using envns_::data_type;
783     using envns_::transforms_type;
784
785     struct external_transform;
786
787     template<typename PrimitiveTransform = void, typename X = void>
788     struct transform;
789
790     template<typename Grammar, typename Fun = Grammar>
791     struct when;
792
793     template<typename Fun>
794     struct otherwise;
795
796     template<typename Fun>
797     struct call;
798
799     template<typename Fun>
800     struct make;
801
802     template<typename PrimitiveTransform>
803     struct protect;
804
805     template<typename T>
806     struct noinvoke;
807
808     template<typename Fun>
809     struct lazy;
810
811     template<typename Sequence, typename State, typename Fun>
812     struct fold;
813
814     template<typename Sequence, typename State, typename Fun>
815     struct reverse_fold;
816
817     // Q: can we replace fold_tree with fold<flatten(_), state, fun> ?
818     // A: once segmented Fusion works well.
819     template<typename Sequence, typename State, typename Fun>
820     struct fold_tree;
821
822     template<typename Sequence, typename State, typename Fun>
823     struct reverse_fold_tree;
824
825     template<typename Grammar, typename Domain = deduce_domain>
826     struct pass_through;
827
828     template<typename Grammar = detail::_default>
829     struct _default;
830
831     struct _expr;
832     struct _state;
833     struct _data;
834
835     struct _value;
836
837     struct _void;
838
839     template<typename T, T I>
840     struct integral_c;
841
842     template<char I>
843     struct char_;
844
845     template<int I>
846     struct int_;
847
848     template<long I>
849     struct long_;
850
851     template<std::size_t I>
852     struct size_t;
853
854     template<int I>
855     struct _child_c;
856
857     typedef _child_c<0> _child0;
858     typedef _child_c<1> _child1;
859     typedef _child0     _child;
860     typedef _child0     _left;
861     typedef _child1     _right;
862
863     // _child2, _child3, _child4, ...
864     #define M0(Z, N, DATA) typedef _child_c<N> BOOST_PP_CAT(_child, N);
865     BOOST_PP_REPEAT_FROM_TO(
866         2
867       , BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY)
868       , M0
869       , ~
870     )
871     #undef M0
872
873     struct _byref;
874     struct _byval;
875
876     template<typename Tag>
877     struct _env_var;
878
879     struct _env;
880
881     template<typename T>
882     struct is_extension;
883
884     namespace exops = exprns_;
885
886 }} // namespace boost::proto
887
888 #endif