|
Boost Users : |
From: Björn Lindberg (yg-boost-users_at_[hidden])
Date: 2002-10-25 10:04:02
I cannot get the code below to compile with g++-3.2 on GNU/Linux. The
error message is:
exempel.cpp: In member function `void functor<T>::operator()() [with T =
P]':
exempel.cpp:26: instantiated from here
exempel.cpp:18: `nodetab' has incomplete type
exempel.cpp:18: confused by earlier errors, bailing out
Since everything is visible at compile time, I can't understand why I'm
getting this error message, or what to do about it.
-------------
#include <boost/multi_array.hpp>
struct P
{};
template<typename T>
struct functor
{
typedef boost::multi_array<T, 3> table_t;
typedef typename table_t::array_view<2>::type nodetab_t;
typedef typename table_t::index_range range;
void operator()()
{
table_t table(boost::extents[5][6][7]);
nodetab_t nodetab = table[boost::indices[1][range()][range()]];
}
};
int main()
{
functor<P> vis;
vis();
return 0;
}
-------------
Björn
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