Special operator overloads containing a binary expression are collected here. More...
#include "viennamath/forwards.h"
#include "viennamath/compiletime/ct_binary_expr.hpp"
Go to the source code of this file.
Namespaces | |
namespace | viennamath |
The main ViennaMath namespace. All types and functions for the user reside here. | |
Functions | |
template<typename ScalarType , long value_1, typename RHS , long value_2> | |
ct_binary_expr< ct_constant < value_1+value_2 >, op_plus < ScalarType >, RHS > | operator+ (ct_binary_expr< ct_constant< value_1 >, op_plus< ScalarType >, RHS > const &lhs, ct_constant< value_2 > const &other) |
Special overload: (ct_c1 + X) + ct_c2 becomes [ct_c1 + ct_c2] + X, where ct_c1 and ct_c2 are compiletime constants and X is any other expression. | |
template<typename ScalarType , long value_1, typename RHS , long value_2> | |
ct_binary_expr< ct_constant < value_1+value_2 >, op_minus < ScalarType >, RHS > | operator+ (ct_binary_expr< ct_constant< value_1 >, op_minus< ScalarType >, RHS > const &lhs, ct_constant< value_2 > const &other) |
Special overload: (ct_c1 - X) + ct_c2 becomes [ct_c1 + ct_c2] - X, where ct_c1 and ct_c2 are compiletime constants and X is any other expression. | |
template<typename ScalarType , typename OtherScalarType , typename RHS , long value> | |
ct_binary_expr< rt_constant < typename promote_traits < OtherScalarType, op_plus < ScalarType >, long > ::result_type >, op_minus < ScalarType >, RHS > | operator+ (ct_binary_expr< rt_constant< OtherScalarType >, op_minus< ScalarType >, RHS > const &lhs, ct_constant< value > const &other) |
Special overload: (c1 - X) + ct_c2 -> [c1 + ct_c2] - X, where ct_c1 and ct_c2 are compiletime constants and X is any other expression. | |
template<typename ScalarType , id_type id, typename RHS > | |
RHS | operator- (ct_binary_expr< ct_variable< id >, op_plus< ScalarType >, RHS > const &lhs, ct_variable< id > const &other) |
Special overload: (A + B) - A -> B, where A is an variable and X can be anything. | |
template<long value_1, typename RHS , long value_2, typename T > | |
ct_binary_expr< ct_constant < value_1-value_2 >, op_plus < T >, RHS > | operator- (ct_binary_expr< ct_constant< value_1 >, op_plus< T >, RHS > const &lhs, ct_constant< value_2 > const &other) |
Special overload: (ct_c1 + X) - ct_c2 -> [ct_c1 - ct_c2] + X, where ct_c1 and ct_c2 are compiletime constants and X is any other expression. | |
template<typename OtherScalarType , typename RHS , long value, typename T > | |
ct_binary_expr< rt_constant < typename promote_traits < OtherScalarType, op_plus< T > , long >::result_type > , op_plus< T >, RHS > | operator- (ct_binary_expr< rt_constant< OtherScalarType >, op_plus< T >, RHS > const &lhs, ct_constant< value > const &other) |
Special overload: (c1 + X) - ct_c2 -> [c1 - ct_c2] + X, where ct_c1 and ct_c2 are compiletime constants and X is any other expression. | |
template<long value_1, typename RHS , long value_2, typename T > | |
ct_binary_expr< ct_constant < value_1-value_2 >, op_minus < T >, RHS > | operator- (ct_binary_expr< ct_constant< value_1 >, op_minus< T >, RHS > const &lhs, ct_constant< value_2 > const &other) |
Special overload: (ct_c1 - X) - ct_c2 -> [ct_c1 - ct_c2] - X, where ct_c1 and ct_c2 are compiletime constants and X is any other expression. | |
template<typename OtherScalarType , typename RHS , long value, typename T > | |
ct_binary_expr< rt_constant < typename promote_traits < OtherScalarType, op_plus< T > , long >::result_type > , op_minus< T >, RHS > | operator- (ct_binary_expr< rt_constant< OtherScalarType >, op_minus< T >, RHS > const &lhs, ct_constant< value > const &other) |
Special overload: (c1 - X) - ct_c2 -> [c1 - ct_c2] - X, where ct_c1 and ct_c2 are compiletime constants and X is any other expression. | |
template<typename LHS , typename OP , typename RHS > | |
ct_constant< 1 > | operator/ (ct_binary_expr< LHS, OP, RHS > const &lhs, ct_binary_expr< LHS, OP, RHS > const &other) |
Special overload: division of the same thing leads to '1'. |
Special operator overloads containing a binary expression are collected here.