|
Ublas : |
Subject: Re: [ublas] Numeric traits for ublas bounded_vector and matrix
From: Jesse Perla (jesseperla_at_[hidden])
Date: 2010-02-22 11:15:58
Rutger ter Borg <rutger <at> terborg.net> writes:
> E.g., result_of::size< double[10] >::type will be an mpl::int_<10>.
With the latest from svn, the types are:
boost::numeric::bindings::result_of::size< double[10] >::type
== mpl::int_<10> ...as expected
But boost::numeric::bindings::result_of::size< ublas::bounded_vector<double,3>
>::type == ptrdiff_t ...which is not what we want.
...and in likely related code
The following assertion work:
static_assert(boost::numeric::bindings::has_static_size<double[10]>::value,
"Failure of traits");
And the following fails.
static_assert(boost::numeric::bindings::has_static_size<
ublas::bounded_vector<double,3>>::value, "Failure of traits");