Boost.Python / Graph library problem after cvs update

With the latest Boost CVS compilation of boost/libs/python/src/object/inheritance.cpp with the old IRIX MIPSpro compiler (EDG 238) fails for this code in boost/boost/graph/properties.hpp: namespace detail { template<typename VertexBundle, typename EdgeBundle> type_traits::yes_type is_vertex_bundle_helper(VertexBundle*); template<typename VertexBundle, typename EdgeBundle> type_traits::no_type is_vertex_bundle_helper(EdgeBundle*); template<typename VertexBundle, typename EdgeBundle, typename Bundle> struct is_vertex_bundle { BOOST_STATIC_CONSTANT(bool, value = ((sizeof(is_vertex_bundle_helper<VertexBundle, EdgeBundle>((Bundle*)0)) == sizeof(type_traits::yes_type)))); }; } The error is: cc-1278 CC: ERROR File = /txusr/rwgrosse/hot/boost/boost/graph/properties.hpp, Line = 363 No instance of overloaded function "boost::detail::is_vertex_bundle_helper" matches the argument list. The argument types are: (Bundle *). BOOST_STATIC_CONSTANT(bool, value = ((sizeof(is_vertex_bundle_helper<VertexBundle, EdgeBundle>((Bundle*)0)) ^ I tried to rearrange the code a bit: namespace detail { template<typename VertexBundle, typename EdgeBundle> struct is_vertex_bundle_helper { static type_traits::yes_type get(VertexBundle*); static type_traits::no_type get(EdgeBundle*); }; template<typename VertexBundle, typename EdgeBundle, typename Bundle> struct is_vertex_bundle { typedef is_vertex_bundle_helper<VertexBundle, EdgeBundle> helper_t; BOOST_STATIC_CONSTANT(bool, value = ((sizeof(helper_t::get((Bundle*)0)) == sizeof(type_traits::yes_type)))); }; } This still compiles with other compilers (gcc 3.4 and EDG 245), but not with the old EDG 238: cc-1108 CC: ERROR File = /txusr/rwgrosse/hot/boost/boost/graph/properties.hpp, Line = 368 The indicated expression must have pointer-to-function type. BOOST_STATIC_CONSTANT(bool, value = ((sizeof(helper_t::get((Bundle*)0)) == sizeof(type_traits::yes_type)))); ^ It doesn't even compile if I simplify the code like this: cc-1108 CC: ERROR File = /txusr/rwgrosse/hot/boost/boost/graph/properties.hpp, Line = 371 The indicated expression must have pointer-to-function type. static const std::size_t value1 = sizeof(helper_t::get((Bundle*)0)); ^ 1 error detected in the compilation of "/txusr/rwgrosse/hot/boost/libs/python/sr I am lost here. Suggestions for workarounds are very much appreciated. It used to compile with the CVS from a couple of days ago. It is important to us to get the IRIX build working again. Thanks in advance, Ralf P.S.: inheritance.cpp compiles if I simply set BOOST_STATIC_CONSTANT(bool, value = false); Therefore I was hopeful that the problem can be fixed by rearranging the code fragments shown above. __________________________________ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail

On Wednesday 23 June 2004 11:28 am, Ralf W. Grosse-Kunstleve wrote:
The error is:
cc-1278 CC: ERROR File = /txusr/rwgrosse/hot/boost/boost/graph/properties.hpp, Line = 363 No instance of overloaded function "boost::detail::is_vertex_bundle_helper" matches the argument list.
The argument types are: (Bundle *). BOOST_STATIC_CONSTANT(bool, value = ((sizeof(is_vertex_bundle_helper<VertexBundle, EdgeBundle>((Bundle*)0)) ^
I tried to rearrange the code a bit: [snip] I am lost here. Suggestions for workarounds are very much appreciated. It used to compile with the CVS from a couple of days ago. It is important to us to get the IRIX build working again.
Does is_convertible work on this compiler? We can emulate those tricks if it does. For now, I've disabled bundled properties so we can get things running: if you'd like to play with it more, just remove the appropriate #define of BOOST_GRAPH_NO_BUNDLED_PROPERTIES in boost/graph/properties.hpp and hack away. Doug

Doug Gregor <dgregor@cs.indiana.edu> writes:
Does is_convertible work on this compiler?
If Boost.Python ever worked there, then yes.
We can emulate those tricks if it does.
I suggest you just use is_convertible<Bundle*,VertexBundle*> as a dispatch tag; it's derived from mpl::true_ or mpl::false_. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com

On Wednesday 23 June 2004 3:31 pm, David Abrahams wrote:
Doug Gregor <dgregor@cs.indiana.edu> writes:
Does is_convertible work on this compiler?
If Boost.Python ever worked there, then yes.
We can emulate those tricks if it does.
I suggest you just use is_convertible<Bundle*,VertexBundle*> as a dispatch tag; it's derived from mpl::true_ or mpl::false_.
I was hoping to be able to catch the cases where the conversion might be ambiguous, but I suspect that even the users we've confused the most with property maps won't do that :) Ralf, could you see if that helps? Doug

--- Doug Gregor <dgregor@cs.indiana.edu> wrote:
I was hoping to be able to catch the cases where the conversion might be ambiguous, but I suspect that even the users we've confused the most with property maps won't do that :)
Ralf, could you see if that helps?
It seems like my emails take some time to get through. :( Did you write this before you saw my previous reply? Anyway, I did another cvs update after seeing your message above but there were not differences to what I had already. The last platform is now through munching on the latest boost CVS, completely unmodified, and I am glad to report that there are no hickups. Ralf __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail

--- Doug Gregor <dgregor@cs.indiana.edu> wrote:
Does is_convertible work on this compiler?
I think the answer is yes! Thanks a lot for the fast fix!
We can emulate those tricks if it does. For now, I've disabled bundled properties so we can get things running:
if you'd like to play with it more, just remove the appropriate #define of BOOST_GRAPH_NO_BUNDLED_PROPERTIES in boost/graph/properties.hpp and hack away.
inheritance.cpp compiles fine without any changes. I am still compiling all the rest, on many platforms, which takes a few hours on some old machines, but it looks perfect so far. Thanks again, Ralf __________________________________ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail
participants (3)
-
David Abrahams
-
Doug Gregor
-
Ralf W. Grosse-Kunstleve