A proxy object which allows for the use of plain default_numeric_type with template operator+, operator-, operator*, operator/ without running into problems with ambiguity. With the proxy object, one additional conversion is required, thus resolving the ambiguity. More...
#include <forwards.h>
Public Member Functions | |
numeric_type_proxy (NumericT value) | |
NumericT | get () const |
A proxy object which allows for the use of plain default_numeric_type with template operator+, operator-, operator*, operator/ without running into problems with ambiguity. With the proxy object, one additional conversion is required, thus resolving the ambiguity.
example: operator+(expr e, numeric_t val);
template <typename scalartype>=""> operator+(expr e, ct_constant<value>);
lead to ambiguity for e + 4;
numeric_type_proxy | ( | NumericT | value | ) | [inline] |
NumericT get | ( | ) | const [inline] |