Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-11-21 10:41:37


This showed up on the Python C++-sig. I think it's an issue with addressof()


attached mail follows:


Hello c++-sig,

I'm exporting c++ class nested in other c++ class:
/////////////
struct C{
    struct N{};
};

BOOST_PYTHON_MODULE(hello)
{
    class_<C::N>("C.N");
}
/////////////

and getting this error message:

C:\Tools\boost_1_29_0\boost\utility\addressof.hpp(26) : error C2440: 'return' : cannot convert from 'const C::N *' to 'C::N *'
        Conversion loses qualifiers

What is fun that in addressof.hpp there's a comment:
// Do not make addressof() inline. Breaks MSVC 7. (Peter Dimov)

Strange, isn't it?

Best regards,
 Kerim mailto:warkid_at_[hidden]

_______________________________________________
C++-sig mailing list
C++-sig_at_[hidden]
http://mail.python.org/mailman/listinfo/c++-sig


-- 
                       David Abrahams
   dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

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