Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-07-11 09:29:43


Nasty.
I don't know how we're going to avoid this problem in general.
I hate the idea of mangling distant code just to prevent possible
interactions in a buggy compiler.

-Dave

----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, July 11, 2001 9:04 AM
Subject: [boost] Nested bind<> classes break boost::bind<>

> I have identified the cause of the problem with the boost::bind<R>(f, ...)
> notation on MSVC.
>
> Several boost libraries (graph, type_traits) use 'bind' as a name of a
> nested class/struct; example from conversion_traits.hpp (included
indirectly
> from function.hpp):
>
> struct from_not_void_conversion {
> template <class From, class To>
> struct bind {
> static no_type _m_check(...);
> static yes_type _m_check(To);
> public:
> void foo(); // avoid warning about all members being private
> static From _m_from;
> enum { exists = sizeof( _m_check(_m_from) ) == sizeof(yes_type) };
> };
> };
>
> This confuses MSVC.
>
> I suggest that the 'bind' internal classes be renamed to something less
> common, like 'bind_17' (works for me) or 'inner.'
>
> --
> Peter Dimov
> Multi Media Ltd.
>
>
> Info: http://www.boost.org Unsubscribe:
<mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


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