hash_map in boost::multi_array



  • hallo zusammen, ich brauche einen 2d Array für eine Art quadtrees. Beim Stöbern im Internet bin ich auf multi_array der boost bibliothek gestoßen.
    Scheinbar funktioniert das nicht in Verbindung mit Containern. Konkret gesagt benötige ich ein 2D Array von Hashmaps
    dabei entsteht unter verwendung des folgenden Codes

    typedef boost::multi_array<hash_map<int16_t,_Tp *>, 2> QUADTREE2D_MAP;
            typedef QUADTREE2D_MAP::index index;
    

    folgende fehlermeldung:

    CCharacterQuadTree2D.hpp:84: error: type 'boost::multi_array<__gnu_cxx::hash_map<short int, _Tp*, __gnu_cxx::hash<short int>, 
    std::equal_to<short int>, std::allocator<_Tp*> >, 2ul, std::allocator<__gnu_cxx::hash_map<short int, _Tp*, __gnu_cxx::hash<short int>,
    std::equal_to<short int>, std::allocator<_Tp*> > > >' is not derived from type 'CCharacterQuadTree2D<_Tp>'
    CCharacterQuadTree2D.hpp:84: error: expected ';' before 'index'
    

    in der 2. Zeile bei den typedef.


Anmelden zum Antworten