| X | Type that is a model of ScalarExpression |
| C | Type so that X is convertible to C |
| a | Objects of type X |
| c | Object of type C |
| Name | Expression | Type requirements | Return type |
|---|---|---|---|
| ConversionAssignment | c=a | C | |
| ConversionConstructor | C c(a) | C |
| Name | Expression | Precondition | Semantics | Postcondition |
|---|---|---|---|---|
| ConversionAssignment [1] | c=a | Returns the value of the expression | ||
| ConversionConstructor [1] | C c(a) | Returns the value of the expression |
template <class T> T operator() const')
to allow this conversion. Scalars are different in respect to vector and matrices because
it is not possible to add an assignment operator to the builtin types (scalars) that
accept a scalar-expression. One can argue that it is neither possible to add an
assignment operator to std::vector and thus an implicit conversion operator
should be foreseen for vector-expressions too. The drawback however would be that this
would be very inefficient for vectors to return them by value and thus an assign
is thus far superior anyway.