[G++] compilation error: difference between int and bool

Fabrice Bauzac noon@cote-dazur.com
Sat Jun 2 11:59:00 GMT 2001


Hello,

Could anyone explain me why

==============================
#include <vector>

class T {
  vector <bool> v;
  bool &element (int i) { return v[i]; }
};
==============================

doesn't compile?

When I replace bool with int, it compiles.

TIA.
-- 
Fabrice Bauzac



More information about the Gcc-help mailing list