bug-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

2.95.3 and addresses of overloaded member functions => cc1plus eats all


From: Johan Johansson
Subject: 2.95.3 and addresses of overloaded member functions => cc1plus eats all memory
Date: Wed, 09 Jan 2002 18:01:57 GMT
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011226

Let me first state that this seems to work with some code and not with other code. Once my deadline is past I might spend some time isolating the exact circumstances, but I thought I'd ask if anyone already knows them. My problem is this:

I am composing member functions using a member template of the form

template <
        typename Ev,
        void (Ctx::*a1)(Ev*),
        void (Ctx::*a2)(Ev*)
>
void progn(Ev* ev) {
        (this->*a1)(ev);
        (this->*a2)(ev);
}

which would then be instantiated and pass on by

someCall(&Ctx::progn<SomeEvent, &Ctx::f1, &Ctx::f2>);

This works fine as long as none of f1 and f2 are overloaded. If either one is, cc1plus will eat all memory and die.

This is fixed in gcc3, but for many reasons our project has not switched to version 3 yet. I couldn't find anything about this by means of google. Are the exact circumstances known or is there some workaround that "just works"? For now I have resorted to semi-hungarian notation applied to function names, which annoys me no end.

j



reply via email to

[Prev in Thread] Current Thread [Next in Thread]