This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
[G++] compilation error: difference between int and bool
- To: help-gcc at gnu dot org
- Subject: [G++] compilation error: difference between int and bool
- From: noon at cote-dazur dot com (Fabrice Bauzac)
- Date: Sat, 2 Jun 2001 21:04:46 +0200
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