Boost logo

Boost :

From: John Eddy (johneddy_at_[hidden])
Date: 2005-02-10 20:03:49


The following bit of code gives me an undefined symbol (l1) when using
gcc 3.2.2-5.8. Is there something wrong with the code or is there a bug
in the compiler or a setting I don't know about, etc?

struct S { static const short l1 = 10; };

void go(const short& l) {}; // causes undefined symbol l1

int main(int argc, char* argv[]) { go(S::l1); return 0; }

If I do normal, non-in-class-initialization, the problem doesn't appear
nor does it appear if I accept the short by value in go.

Thanks,
John


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk