Boost logo

Boost Users :

Subject: [Boost-users] [Matrix] - Complie time error on Sun Solaris.
From: Jagpreet Athwal (jagpreet.athwal_at_[hidden])
Date: 2012-10-12 11:45:10


I am trying to compile the below example program listed on boost.org:

#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/io.hpp>

int main () {
    using namespace boost::numeric::ublas;
    matrix<double> m (3, 3);
    for (unsigned i = 0; i < m.size1 (); ++ i)
        for (unsigned j = 0; j < m.size2 (); ++ j)
            m (i, j) = 3 * i + j;
    std::cout << m << std::endl;
}

When I compile it, I get these errors. Could anyone please help me with
getting rid of these?

/boost/numeric/ublas/storage.hpp", line 1046: Error: Too few arguments for
template
std::reverse_iterator<boost::numeric::ublas::basic_range<boost::numeric::ublas::Z,
boost::numeric::ublas::D>::const_iterator>.
/boost/numeric/ublas/storage.hpp", line 1076: Where: While specializing
"boost::numeric::ublas::basic_range<boost::numeric::ublas::Z,
boost::numeric::ublas::D>".
/boost/numeric/ublas/storage.hpp", line 1076: Where: Specialized in
non-template code.
/boost/numeric/ublas/storage.hpp", line 1265: Error: Too few arguments for
template
std::reverse_iterator<boost::numeric::ublas::basic_slice<boost::numeric::ublas::Z,
boost::numeric::ublas::D>::const_iterator>.
/boost/numeric/ublas/storage.hpp", line 1296: Where: While specializing
"boost::numeric::ublas::basic_slice<boost::numeric::ublas::Z,
boost::numeric::ublas::D>".
/boost/numeric/ublas/storage.hpp", line 1296: Where: Specialized in
non-template code.
/boost/numeric/ublas/storage.hpp", line 1525: Error: Too few arguments for
template
std::reverse_iterator<boost::numeric::ublas::indirect_array<boost::numeric::ublas::A>::const_iterator>.
/boost/numeric/ublas/storage.hpp", line 1558: Where: While specializing
"boost::numeric::ublas::indirect_array<boost::numeric::ublas::A>".
/boost/numeric/ublas/storage.hpp", line 1558: Where: Specialized in
non-template code.
/boost/numeric/ublas/storage.hpp", line 246: Error: Too few arguments for
template std::reverse_iterator<const boost::numeric::ublas::T*>.
/boost/numeric/ublas/fwd.hpp", line 126: Where: While specializing
"boost::numeric::ublas::unbounded_array<boost::numeric::ublas::T,
boost::numeric::ublas::ALLOC>".
/boost/numeric/ublas/fwd.hpp", line 126: Where: Specialized in
non-template code.
/boost/numeric/ublas/storage.hpp", line 247: Error: Too few arguments for
template std::reverse_iterator<boost::numeric::ublas::T*>.
/boost/numeric/ublas/fwd.hpp", line 126: Where: While specializing
"boost::numeric::ublas::unbounded_array<boost::numeric::ublas::T,
boost::numeric::ublas::ALLOC>".
/boost/numeric/ublas/fwd.hpp", line 126: Where: Specialized in
non-template code.
5 Error(s) detected.

Thanks,
Jag



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net