From: Marat Khalili (0x8.0p15_at_[hidden])
Date: 2007-07-13 16:54:27
Good time of the day,
I'm using UBLAS in BOOST 1.33.1. I parameterizing UBLAS vectors with my
own class. I had no problems with the dense vector, but for the
mapped_vector simple assignment operation failed to compile, complaining
(to my surprise) that call to sqrt is ambiguous. This was quite confusing.
After all I found out that call to
expects much more from the vector value class than copy operation itself.
Moreover, if all operators and functions used by expression_type_check
are defined, but std::numeric_limits template is not specialized for the
class, the same assert fails at runtime because
std::numeric_limits::epsilon() returns zero by default.
I wonder if I will run into more problems for more complex operations
than simple assignment. I found no requirements to value types in
documentation. Does it mean only basic floating-point types are
supported? Should I define some more traits of my class besides
I also wonder if BOOST_UBLAS_TYPE_CHECK should really be on by default
(even with NDEBUG), since checks of this kind are probably more useful
for debugging the library itself, not the user code.
Can please someone clarify the situation with user-defined types here?
With Best Regards,