Boost logo

Boost :

From: Chris Trengove (trengove_at_[hidden])
Date: 2002-08-22 17:27:55


John,

I think the problem is that, inside the "is_member_function_pointer_select"
template, the compiler no longer accepts the use of the return value of a
function inside the static initialiser.

    BOOST_STATIC_CONSTANT(
              bool, value = (1 ==
sizeof(detail::is_member_function_pointer_helper(make_t()))) );

I have temporarily fixed this by changing the above to

    enum { value = (1 ==
sizeof(detail::is_member_function_pointer_helper(make_t()))) };

which the compiler accepts. After testing, I found that anything like

template <class T>
struct X
{
    static T& f();
    static const int value = sizeof(f());
};

will not compile, whether or not instantiated.

I came across this while messing with Boost Python v2, using the recently
patched version of the CBuilder 6 compiler (0x562). So it looks like there
may be some significant changes for 0x562 and 0x570 (hopefully some bug
fixes as well as new bugs).

Chris

"John Maddock" <john_maddock_at_[hidden]> wrote in message
news:00f701c249d3$81a07960$9a4f87d9_at_1016031671...
> First the good news: Borland have just released a new compiler version
> (0x570) for linux - I've made a few config changes to support this (and
> patched execution_monitor.cpp slightly).
>
> However is_member_function_pointer is failing badly with this compiler
> version (anything that includes composite_traits.hpp will fail to
compile),
> I don't have a patch for this yet, if anyone has any ideas I'm all ears.
>
> Also the signal test program isn't building with C++ Builder 6 - it looks
> like something is trying to instantiate function_traits<int>, again I'm
> hoping someone will have some ideas about this.
>
> Regards,
>
> John Maddock
> http://ourworld.compuserve.com/homepages/john_maddock/index.htm
>
>
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>


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