Specialized operator overloads involoving compiletime constants are defined here. More...
#include <ostream>
#include "viennamath/forwards.h"
#include "viennamath/compiletime/ct_constant.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<long value, typename ScalarType , typename RHS > | |
ct_binary_expr< rt_constant < typename promote_traits < long, op_plus < default_numeric_type > , ScalarType >::result_type > , op_plus < default_numeric_type >, RHS > | operator+ (ct_constant< value > const &lhs, ct_binary_expr< rt_constant< ScalarType >, op_plus< default_numeric_type >, RHS > const &other) |
Special overload: ct_c1 + (c2 + X) -> [ct_c1 + c2] + X, where ct_c1 is a compiletime constant, c2 is a runtime constant, and X is any other expression. | |
template<long value, long value2, typename RHS > | |
ct_binary_expr< ct_constant < value+value2 >, op_plus < default_numeric_type >, RHS > | operator+ (ct_constant< value > const &lhs, ct_binary_expr< ct_constant< value2 >, op_plus< default_numeric_type >, RHS > const &other) |
Special overload: ct_c1 + (ct_c2 + X) -> [ct_c1 + ct_c2] + X, where ct_c1 and ct_c2 are compiletime constants and X is any other expression. | |
template<long value, typename ScalarType , typename RHS > | |
ct_binary_expr< rt_constant < typename promote_traits < long, op_plus < default_numeric_type > , ScalarType >::result_type > , op_minus < default_numeric_type >, RHS > | operator+ (ct_constant< value > const &lhs, ct_binary_expr< rt_constant< ScalarType >, op_minus< default_numeric_type >, RHS > const &other) |
Special overload: ct_c1 + (c2 - X) -> [ct_c1 + c2] - X, where ct_c1 is a compiletime constant, c2 is a runtime constant, and X is any other expression. | |
template<long value, long value2, typename RHS > | |
ct_binary_expr< ct_constant < value+value2 >, op_minus < default_numeric_type >, RHS > | operator+ (ct_constant< value > const &lhs, ct_binary_expr< ct_constant< value2 >, op_minus< default_numeric_type >, RHS > const &other) |
Special overload: ct_c1 + (ct_c2 - X) -> [ct_c1 + ct_c2] - X, where ct_c1 and ct_c2 are compiletime constants and X is any other expression. | |
template<long value, long other_value> | |
ct_constant< value+other_value > | operator+ (ct_constant< value > const &lhs, ct_constant< other_value > const &other) |
Special overload: Condense addition of two compiletime constants into one constant. | |
template<long value, typename ScalarType , typename RHS > | |
ct_binary_expr< rt_constant < typename promote_traits < long, op_minus < default_numeric_type > , ScalarType >::result_type > , op_minus < default_numeric_type >, RHS > | operator- (ct_constant< value > const &lhs, ct_binary_expr< rt_constant< ScalarType >, op_plus< default_numeric_type >, RHS > const &other) |
Special overload: ct_c1 - (c2 + X) -> [ct_c1 - c2] - X, where ct_c1 is a compiletime constant, c2 is a runtime constant, and X is any other expression. | |
template<long value, long value2, typename RHS > | |
ct_binary_expr< ct_constant < value-value2 >, op_minus < default_numeric_type >, RHS > | operator- (ct_constant< value > const &lhs, ct_binary_expr< ct_constant< value2 >, op_plus< default_numeric_type >, RHS > const &other) |
Special overload: ct_c1 - (ct_c2 + X) -> [ct_c1 - ct_c2] - X, where ct_c1 and ct_c2 are compiletime constants and X is any other expression. | |
template<long value, typename ScalarType , typename RHS > | |
ct_binary_expr< rt_constant < typename promote_traits < long, op_minus < default_numeric_type > , ScalarType >::result_type > , op_plus < default_numeric_type >, RHS > | operator- (ct_constant< value > const &lhs, ct_binary_expr< rt_constant< ScalarType >, op_minus< default_numeric_type >, RHS > const &other) |
Special overload: ct_c1 - (c2 - X) -> [ct_c1 - c2] + X, where ct_c1 is a compiletime constant, c2 is a runtime constant, and X is any other expression. | |
template<long value, long value2, typename RHS > | |
ct_binary_expr< ct_constant < value-value2 >, op_plus < default_numeric_type >, RHS > | operator- (ct_constant< value > const &lhs, ct_binary_expr< ct_constant< value2 >, op_minus< default_numeric_type >, RHS > const &other) |
Special overload: ct_c1 - (ct_c2 - X) -> [ct_c1 - ct_c2] + X, where ct_c1 and ct_c2 are compiletime constants and X is any other expression. | |
template<long value, long other_value> | |
ct_constant< value-other_value > | operator- (ct_constant< value > const &lhs, ct_constant< other_value > const &other) |
Special overload: Condense subtraction of two compiletime constants into one constant. | |
template<long value, long other_value> | |
ct_constant< value *other_value > | operator* (ct_constant< value > const &lhs, ct_constant< other_value > const &other) |
Special overload: Condense multiplication of two compiletime constants into one constant. |
Specialized operator overloads involoving compiletime constants are defined here.