
20 Sep
2010
20 Sep
'10
7:32 p.m.
Suresh Kumar wrote:
Could you kindly tell me why the following code does not compile? I guess it is an allocator issue, but how do I go further?
#include
#include <iostream> using namespace std; int main () { class test{ int x; int y; }; typedef boost::multi_array
array_type; typedef array_type::index index; array_type A(boost::extents[3][4][2]); array_type::extent_gen extents; return 0; }
compile errors: multiArray.cpp:11: error: template argument for ‘template<class _Alloc> class std::allocator’ uses local type ‘main()::test’
This says it all. Move test out of function scope into a namespace scope. Jeff