/* * Copyright (c) 2013-2015, Roland Bock * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, this * list of conditions and the following disclaimer in the documentation and/or * other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef SQLPP_EXPRESSION_FWD_H #define SQLPP_EXPRESSION_FWD_H namespace sqlpp { struct boolean; struct integral; struct floating_point; struct noop; namespace op { struct less { using _traits = make_traits; static constexpr const char* _name = "<"; }; struct less_equal { using _traits = make_traits; static constexpr const char* _name = "<="; }; struct equal_to { using _traits = make_traits; }; struct not_equal_to { using _traits = make_traits; }; struct greater_equal { using _traits = make_traits; static constexpr const char* _name = ">="; }; struct greater { using _traits = make_traits; static constexpr const char* _name = ">"; }; struct logical_or { using _traits = make_traits; static constexpr const char* _name = " OR "; }; struct logical_and { using _traits = make_traits; static constexpr const char* _name = " AND "; }; struct logical_not { using _traits = make_traits; }; template struct plus { using _traits = make_traits; static constexpr const char* _name = "+"; }; template struct minus { using _traits = make_traits; static constexpr const char* _name = "-"; }; template struct multiplies { using _traits = make_traits; static constexpr const char* _name = "*"; }; struct divides { using _traits = make_traits; static constexpr const char* _name = "/"; }; struct modulus { using _traits = make_traits; static constexpr const char* _name = "%"; }; template struct unary_minus { using _traits = make_traits; static constexpr const char* _name = "-"; }; template struct unary_plus { using _traits = make_traits; static constexpr const char* _name = "+"; }; template struct bitwise_and { using _traits = make_traits; static constexpr const char* _name = "&"; }; template struct bitwise_or { using _traits = make_traits; static constexpr const char* _name = "|"; }; } template struct binary_expression_t; template struct unary_expression_t; template using less_than_t = binary_expression_t; template using less_equal_t = binary_expression_t; template using equal_to_t = binary_expression_t; template using not_equal_to_t = binary_expression_t; template using greater_than_t = binary_expression_t; template using greater_equal_t = binary_expression_t; template using logical_and_t = binary_expression_t; template using logical_or_t = binary_expression_t; template using plus_t = binary_expression_t, Rhs>; template using minus_t = binary_expression_t, Rhs>; template using multiplies_t = binary_expression_t, Rhs>; template using divides_t = binary_expression_t; template using modulus_t = binary_expression_t; template using logical_not_t = unary_expression_t; template using unary_plus_t = unary_expression_t, Rhs>; template using unary_minus_t = unary_expression_t, Rhs>; template using bitwise_and_t = binary_expression_t, Rhs>; template using bitwise_or_t = binary_expression_t, Rhs>; namespace detail { template struct lhs_impl { using type = noop; }; template struct lhs_impl::value>::type> { using type = typename Expr::_lhs_t; }; template struct rhs_impl { using type = noop; }; template struct rhs_impl::value>::type> { using type = typename Expr::_rhs_t; }; } template using lhs_t = typename detail::lhs_impl::type; template using rhs_t = typename detail::rhs_impl::type; } #endif