Boost logo

Boost Users :

Subject: [Boost-users] A question on boost mpl used by MTL. Can any one with kindness help me?
From: fmingu (fmingu_at_[hidden])
Date: 2010-03-24 00:13:37


I am using MTL(Matrix Template Library) 4 (the version is mtl4-beta-1-r6916) for Matrix computing in Dev-C++ 4.9.8.0 and updated the gcc version from 3.2 to 4.4.1 by installing tdm-mingw-1.908.0-4.4.1-2 and the boost version is 1.34.1. The sample code is :

#include <boost/numeric/mtl/mtl.hpp>

 

int main(int argc, char* argv[])

{

    using namespace mtl; using namespace mtl::matrix;

    

    const unsigned xd= 2, yd= 5, n= xd * yd;

    dense2D<double> A(n, n);

    compressed2D<double> B(n, n);

    hessian_setup(A, 3.0); laplacian_setup(B, xd, yd);

 

    typedef std::complex<double> cdouble;

    dense_vector<cdouble> v(n), w(n);

    for (unsigned i= 0; i < size(v); i++)

       v[i]= cdouble(i+1, n-i), w[i]= cdouble(i+n);

 

    v+= A * w;

    w= B * v;

 

    std::cout << "v is " << v << "\n";

    std::cout << "w is " << w << "\n";

 

    return 0;

}

But the complier tolde me that :

¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­

F:\CB2009\boost_1_34_1\boost_1_34_1/boost/mpl/apply_wrap.hpp:81:31: error: missing binary operator before token "("

F:\CB2009\boost_1_34_1\boost_1_34_1/boost/mpl/apply_wrap.hpp:173:31: error: missing binary operator before token "("

¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­

And the code in the corresponding lines of apply_wrap.hpp are:

¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­.

#elif BOOST_PP_ITERATION_DEPTH() == 1

¡­¡­¡­¡­¡­¡­¡­¡­¡­

#elif BOOST_PP_ITERATION_DEPTH() == 2

And I do not know how to solve it. Can any one with kindness help me?



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