www.digitalmars.com         C & C++   DMDScript  

c++ - using vector typedefs

The test-case uses the bundled SGI STL:

#include <vector.h>

struct A
  struct B
    inline bool operator ()(const vector<int> &a, int i)
      return a.size() == i;
      // Error: 'size' is not a member of undefined class 'vector<int,
      // __default_alloc_template<0,0> >'

  vector<int>::value_type c;

BTW, it works if I delete the definition of "c" or move it to the top of the
class definition.

bye, Christof

http://cmeerw.cjb.net                          Jabber: cmeerw jabber.at
mailto cmeerw at web.de                   ICQ: 93773535, Yahoo!: cmeerw

...and what have you contributed to the Net?
Oct 24 2001