Boost logo

Ublas :

From: Mark Beinker (mark.beinker_at_[hidden])
Date: 2008-05-16 13:01:25


Hi,

it seems that in from boost version 1.34.1 to 1.35.0 the definition of vector_scalar_unary_functor in functional.hpp has changed from

    template<class T>
    struct vector_scalar_unary_functor {
        typedef std::size_t size_type;
        typedef std::ptrdiff_t difference_type;
        typedef T value_type;
        typedef T result_type;
    };

to

    template<class V>
    struct vector_scalar_unary_functor {
        typedef typename V::value_type value_type;
        typedef typename V::value_type result_type;
    };

with the effect that the template parameter could no longer be of integral type.

Was this intentionally and why was this change required?

This breaks code like the example 2 on page
http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Examples_-_How_To_Extend_UBLAS
for implementing custom function on vectors returning scalars.

Is there any other recommended way to implement scalar function on vectors?

Regards,

Mark