Boost logo

Ublas :

Subject: Re: [ublas] Numeric traits for ublas bounded_vector and matrix
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2010-02-23 08:48:50

Jesse Perla wrote:

> But looking at the alternative:
> const static int N = eval_if<has_static_size<T>,
> result_of::size<T>::type, int_<0> >::value;

Try dropping the ::type after result_of::size<T>,

    static const int N = boost::mpl::eval_if<
        bindings::has_static_size< double[10] >,
        bindings::result_of::size< double[10] >,

    std::cout << N << std::endl;

    static const int J = boost::mpl::eval_if<
        bindings::has_static_size< std::vector<double> >,
        bindings::result_of::size< std::vector<double> >,

    std::cout << J << std::endl;

this happens to compile and work on my system.