epoc32/include/stdapis/boost/lambda/detail/operator_actions.hpp
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
     1 // -- operator_actions.hpp - Boost Lambda Library ----------------------
     2 
     3 // Copyright (C) 1999, 2000 Jaakko Järvi (jaakko.jarvi@cs.utu.fi)
     4 //
     5 // Distributed under the Boost Software License, Version 1.0. (See
     6 // accompanying file LICENSE_1_0.txt or copy at
     7 // http://www.boost.org/LICENSE_1_0.txt)
     8 
     9 // For more information, see http://lambda.cs.utu.fi 
    10 
    11 #ifndef BOOST_LAMBDA_OPERATOR_ACTIONS_HPP
    12 #define BOOST_LAMBDA_OPERATOR_ACTIONS_HPP
    13 
    14 namespace boost { 
    15 namespace lambda {
    16 
    17 
    18 // -- artihmetic ----------------------
    19 
    20 class plus_action {};
    21 class minus_action {};
    22 class multiply_action {};
    23 class divide_action {};
    24 class remainder_action {};
    25 
    26 // -- bitwise  -------------------
    27 
    28 class leftshift_action {};
    29 class rightshift_action {};
    30 class xor_action {};
    31 
    32 
    33 // -- bitwise/logical -------------------
    34 
    35 class and_action {};
    36 class or_action {};
    37 class not_action {};
    38 
    39 // -- relational -------------------------
    40 
    41 class less_action {};
    42 class greater_action {};
    43 class lessorequal_action {};
    44 class greaterorequal_action {};
    45 class equal_action {};
    46 class notequal_action {};
    47 
    48 // -- increment/decrement ------------------------------
    49 
    50 class increment_action {};
    51 class decrement_action {};
    52 
    53 // -- void return ------------------------------
    54 
    55 // -- other  ------------------------------
    56 
    57 class addressof_action {};
    58   // class comma_action {}; // defined in actions.hpp
    59 class contentsof_action {};
    60 // class member_pointer_action {}; (defined in member_ptr.hpp)
    61 
    62 
    63 // -- actioun group templates --------------------
    64 
    65 template <class Action> class arithmetic_action;
    66 template <class Action> class bitwise_action;
    67 template <class Action> class logical_action;
    68 template <class Action> class relational_action;
    69 template <class Action> class arithmetic_assignment_action;
    70 template <class Action> class bitwise_assignment_action;
    71 template <class Action> class unary_arithmetic_action;
    72 template <class Action> class pre_increment_decrement_action;
    73 template <class Action> class post_increment_decrement_action;
    74 
    75 // ---------------------------------------------------------
    76 
    77   // actions, for which the existence of protect is checked in return type 
    78   // deduction.
    79 
    80 template <class Act> struct is_protectable<arithmetic_action<Act> > {
    81   BOOST_STATIC_CONSTANT(bool, value = true);
    82 };
    83 template <class Act> struct is_protectable<bitwise_action<Act> > {
    84   BOOST_STATIC_CONSTANT(bool, value = true);
    85 };
    86 template <class Act> struct is_protectable<logical_action<Act> > {
    87   BOOST_STATIC_CONSTANT(bool, value = true);
    88 };
    89 template <class Act> struct is_protectable<relational_action<Act> > {
    90   BOOST_STATIC_CONSTANT(bool, value = true);
    91 };
    92 template <class Act> 
    93 struct is_protectable<arithmetic_assignment_action<Act> > {
    94   BOOST_STATIC_CONSTANT(bool, value = true);
    95 };
    96 template <class Act> struct is_protectable<bitwise_assignment_action<Act> > {
    97   BOOST_STATIC_CONSTANT(bool, value = true);
    98 };
    99 template <class Act> struct is_protectable<unary_arithmetic_action<Act> > {
   100   BOOST_STATIC_CONSTANT(bool, value = true);
   101 };
   102 template <class Act> 
   103 struct is_protectable<pre_increment_decrement_action<Act> > {
   104   BOOST_STATIC_CONSTANT(bool, value = true);
   105 };
   106 template <class Act> struct 
   107 is_protectable<post_increment_decrement_action<Act> > {
   108   BOOST_STATIC_CONSTANT(bool, value = true);
   109 };
   110 
   111 template <> struct is_protectable<other_action<addressof_action> > {
   112   BOOST_STATIC_CONSTANT(bool, value = true);
   113 };
   114 template <> struct is_protectable<other_action<contentsof_action> > {
   115   BOOST_STATIC_CONSTANT(bool, value = true);
   116 };
   117 
   118 template<> struct is_protectable<other_action<subscript_action> > {
   119   BOOST_STATIC_CONSTANT(bool, value = true);
   120 };
   121 template<> struct is_protectable<other_action<assignment_action> > {
   122   BOOST_STATIC_CONSTANT(bool, value = true);
   123 };
   124 
   125 // NOTE: comma action is also protectable, but the specialization is
   126   // in actions.hpp
   127 
   128 
   129 } // namespace lambda 
   130 } // namespace boost
   131 
   132 #endif
   133 
   134 
   135 
   136 
   137 
   138 
   139