[Boost.Intrusive] Intrusive doubly linked list does not compile on xlC11.1

Hi, I'm trying to compile the intrusive doubly linked list example from http://www.boost.org/doc/libs/1_47_0/doc/html/intrusive/list.html#intrusive.... using xlC11.1 on AIX/Power5+ and I am getting the following error: 1540-0216 (S) An expression of type "overloaded function: base_hook_traits<MyClass,boost::intrusive::list_node_traits<void *>,1,boost::intrusive::default_tag,1>::to_node_ptr" cannot be converted to type "boost::intrusive::list_node<void *> *(boost::intrusive::detail::base_hook_traits<MyClass,boost::intrusive::list_node_traits<void *>,1,boost::intrusive::default_tag,1>::*)(MyClass &)". "/scratch/ipapado/usr/include/boost/intrusive/detail/utilities.hpp", line 383.20: 1540-0424 (I) "boost::intrusive::detail::base_hook_traits<MyClass,boost::intrusive::list_node_traits<void *>,1,boost::intrusive::default_tag,1>::to_node_ptr(reference)" is declared on line 383 of "/scratch/ipapado/usr/include/boost/intrusive/detail/utilities.hpp". "/scratch/ipapado/usr/include/boost/intrusive/detail/utilities.hpp", line 386.26: 1540-0424 (I) "boost::intrusive::detail::base_hook_traits<MyClass,boost::intrusive::list_node_traits<void *>,1,boost::intrusive::default_tag,1>::to_node_ptr(const_reference)" is declared on line 386 of "/scratch/ipapado/usr/include/boost/intrusive/detail/utilities.hpp". "/scratch/ipapado/usr/include/boost/intrusive/detail/is_stateful_value_traits.hpp", line 38.1: 1540-0700 (I) The previous message was produced while processing "boost::intrusive::function_detector::DetectMember_InstantiationKey_to_node_ptr<struct boost::intrusive::detail::base_hook_traits<MyClass,boost::intrusive::list_node_traits<void *>,1,boost::intrusive::default_tag,1>,struct boost::intrusive::list_node<void *> *(boost::intrusive::detail::base_hook_traits<MyClass,boost::intrusive::list_node_traits<void *>,1,boost::intrusive::default_tag,1>::*)(class MyClass &),struct boost::intrusive::list...". Any known workarounds? Thanks

On 11/15/2011 07:15 PM, Ioannis Papadopoulos wrote:
Hi,
I'm trying to compile the intrusive doubly linked list example from http://www.boost.org/doc/libs/1_47_0/doc/html/intrusive/list.html#intrusive.... using xlC11.1 on AIX/Power5+ and I am getting the following error:
1540-0216 (S) An expression of type "overloaded function: base_hook_traits<MyClass,boost::intrusive::list_node_traits<void *>,1,boost::intrusive::default_tag,1>::to_node_ptr" cannot be converted to type "boost::intrusive::list_node<void *> *(boost::intrusive::detail::base_hook_traits<MyClass,boost::intrusive::list_node_traits<void *>,1,boost::intrusive::default_tag,1>::*)(MyClass&)". "/scratch/ipapado/usr/include/boost/intrusive/detail/utilities.hpp", line 383.20: 1540-0424 (I) "boost::intrusive::detail::base_hook_traits<MyClass,boost::intrusive::list_node_traits<void *>,1,boost::intrusive::default_tag,1>::to_node_ptr(reference)" is declared on line 383 of "/scratch/ipapado/usr/include/boost/intrusive/detail/utilities.hpp". "/scratch/ipapado/usr/include/boost/intrusive/detail/utilities.hpp", line 386.26: 1540-0424 (I) "boost::intrusive::detail::base_hook_traits<MyClass,boost::intrusive::list_node_traits<void *>,1,boost::intrusive::default_tag,1>::to_node_ptr(const_reference)" is declared on line 386 of "/scratch/ipapado/usr/include/boost/intrusive/detail/utilities.hpp". "/scratch/ipapado/usr/include/boost/intrusive/detail/is_stateful_value_traits.hpp", line 38.1: 1540-0700 (I) The previous message was produced while processing "boost::intrusive::function_detector::DetectMember_InstantiationKey_to_node_ptr<struct boost::intrusive::detail::base_hook_traits<MyClass,boost::intrusive::list_node_traits<void *>,1,boost::intrusive::default_tag,1>,struct boost::intrusive::list_node<void *> *(boost::intrusive::detail::base_hook_traits<MyClass,boost::intrusive::list_node_traits<void *>,1,boost::intrusive::default_tag,1>::*)(class MyClass&),struct boost::intrusive::list...".
Any known workarounds?
Thanks
It happens in Boost 1.48 as well.

El 18/11/2011 2:09, Ioannis Papadopoulos escribió:
On 11/15/2011 07:15 PM, Ioannis Papadopoulos wrote:
Hi,
I'm trying to compile the intrusive doubly linked list example from http://www.boost.org/doc/libs/1_47_0/doc/html/intrusive/list.html#intrusive....
using xlC11.1 on AIX/Power5+ and I am getting the following error:
Is xlC standard conforming enough? I don't access to that compiler so I don't test it with that toolset. Ion

On 11/18/2011 10:51 AM, Ion Gaztañaga wrote:
El 18/11/2011 2:09, Ioannis Papadopoulos escribió:
On 11/15/2011 07:15 PM, Ioannis Papadopoulos wrote:
Hi,
I'm trying to compile the intrusive doubly linked list example from http://www.boost.org/doc/libs/1_47_0/doc/html/intrusive/list.html#intrusive....
using xlC11.1 on AIX/Power5+ and I am getting the following error:
Is xlC standard conforming enough? I don't access to that compiler so I don't test it with that toolset.
Ion
xlC 11.1 is quite good and till now I haven't encountered major issues. I'm willing to go through the code and fix intrusive for xlC, provided that I get some guidance. For starters, the is_convertible is invoking undefined behavior. xlC rightfully warns against passing a non-POD through ellipsis (only PODs are allowed there, otherwise it is considered undefined behavior: "/scratch/ipapado/usr/include/boost/intrusive/detail/mpl.hpp", line 70.45: 1540-2924 (W) Cannot pass an argument of non-POD class type "boost::intrusive::detail::is_convertible<boost::intrusive::detail::member_hook_traits<MyClass,boost::intrusive::list_member_hook<boost::intrusive::none,boost::intrusive::none,boost::intrusive::none>,&MyClass::member_hook_> *,boost::intrusive::detail::default_hook_tag *>::false_t" through ellipsis. Changing it to template <class T, class U> class is_convertible { typedef char true_t; /**/ struct /**/ false_t { char dummy[2]; }; static true_t dispatch( /**/ U* /**/ ); static false_t dispatch(...); public: static const bool value = sizeof(dispatch(static_cast<T*>(0))) == sizeof(true_t); }; or using the one provided in type_traits, resolves the warnings. Still trying to figure out why the error with the conversion exists though.
participants (2)
-
Ioannis Papadopoulos
-
Ion Gaztañaga