Vector of vectors of T in template<T> class

Posted by topright on Stack Overflow See other posts from Stack Overflow or by topright
Published on 2010-03-15T15:51:46Z Indexed on 2010/03/15 15:59 UTC
Read the original article Hit count: 239

Filed under:
|
|

Why this code does not compile (Cygwin)?

#include <vector>

template <class Ttile>
class Tilemap
{
    typedef std::vector< Ttile > TtileRow;
    typedef std::vector< TtileRow > TtileMap;
    typedef TtileMap::iterator TtileMapIterator; // error here
};

error: type std::vector<std::vector<Ttile, std::allocator<_CharT> >, std::allocator<std::vector<Ttile, std::allocator<_CharT> > > >' is not derived from typeTilemap'

© Stack Overflow or respective owner

Related posts about std

Related posts about vector