Boost logo

Ublas :

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


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;


    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
for implementing custom function on vectors returning scalars.

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