
I want to make a 3D array of std::lists: boost::multi_array<std::list<CSomething>,3> listbin; Then I'd like to actually use those lists: /// Walk through list at x,y,z for(std::list<CSomething>::iterator iter = listbin[x][y][z].begin(); reti != iter[x][y][z].end(); iter++) { iter->m_foo += 42; } But multi_array is giving me back *const* list iterators, producing the error: error: conversion from `std::_List_const_iterator<CSomething>' to non-scalar type `std::_List_iterator<CSomething>' requested Why is this so? I can trick the compiler by doing a cast like: std::list<CSomething>::iterator iter = ((std::list<CSomething>)listbin[x][y][z]).begin(); but this seems to poop out at runtime. Is there a proper way to do this? Joshua Schpok