Boost logo

Boost :

From: Chris Trengove (trengove_at_[hidden])
Date: 2003-04-04 22:47:57

"David Abrahams" <dave_at_[hidden]> wrote in message
> Is this what you meant by "not being able to use template syntax with
> member function pointers?"

Yes, this is the infamous BCC "emoticon" bug. The parser accepts a number of
characters (in addition to ">") as valid in terminating a template. An
example, borrowed from Chris Uzdavinis, is that BCC will happily accept the

vector< vector< vector< int }:) x;

Because member function pointers include an ")", they are always treated as
terminating any template, and so they don't compile. To my mind, this is a
rather amazing bug to have been lying around so long, since you wouldn't
think it would be too difficult to fix this elementary parsing error.

> I'm willing to jump through one or two hoops to get Borland support.
> In this case, the extra PP generation should be a special case for
> Borland, and all member_function_cast invocations should be wrapped
> up in a macro like BOOST_PYTHON_MEMBER_FUNCTION_CAST(target, f) which
> hides the horribility from users.
> How does that sound?

That sounds OK, and I will work in that direction, but I should point out
that I have yet to get any "decent" examples to compile. Hopefully, now that
I have a solution to this problem, I will be that much closer, but one never
knows. The other thing which is always in the back of my mind is the
potential for the future release of Borland C++Builder 7 (whenever that is)
to make a lot of these hacks unnecessary (both for Boost.Python and for
other Boost libraries). Borland have announced that they are completely
re-architecting their compiler for this release.

Chris Trengove

Boost list run by bdawes at, gregod at, cpdaniel at, john at