Fix for intrusive on Sun CC
I'm not sure if it fixes everything, but I was able debug some of the meta-programming and find a discrepancy between gcc and Sun CC which causes normal usage to break. http://www.boost.org/doc/libs/1_39_0/boost/intrusive/detail/utilities.hpp template <class T> struct internal_base_hook_bool { template<bool Add> struct two_or_three {one _[2 + Add];}; template <class U> static one test(...); template <class U> static two_or_three<U::boost_intrusive_tags::is_base_hook> test (detail::bool_<U::boost_intrusive_tags::is_base_hook>* = 0); static const std::size_t value = sizeof(test<T>(0)); }; On gcc it does what it's suppose to; value = 1 - iff T has no boost_intrusive_tags::is_base_hook 2 - iff T::boost_intrusive_tags::is_base_hook=false 3 - iff T::boost_intrusive_tags::is_base_hook=true On Sun CC it's always 1. So this is a usage of SFINAE which doesn't seem to work on SunCC, but other examples do work just fine: class_has_move_assign here: http://www.boost.org/doc/libs/1_38_0/boost/unordered/detail/move.hpp Note how they use a second test(int) function. This works on Sun CC! 1) I've never submitted a change. Will someone else take this over or do I need to dive in and submit changes to the repository? Do I need to talk this library's owner first? 2) Is this a definite CC compiler bug?
Chris Hite wrote:
1) I've never submitted a change. Will someone else take this over or do I need to dive in and submit changes to the repository? Do I need to talk this library's owner first?
I'd suggest submitting your patch via a new Trac ticket: https://svn.boost.org/trac/boost/
I've fixed intrusive for Sun CC: https://svn.boost.org/trac/boost/ticket/3339 Would someone turn back on the regression tests in trunk. Is it possible to upgrade the complier on and Sandia? It's two years old and Sun has claimed to have fixed some boost related issues.
On Aug 26, 2009, at 3:40 AM, Chris Hite wrote:
I've fixed intrusive for Sun CC: https://svn.boost.org/trac/boost/ticket/3339
Would someone turn back on the regression tests in trunk.
Is it possible to upgrade the complier on and Sandia? It's two years old and Sun has claimed to have fixed some boost related issues.
We just installed sun-5.10 so we'll see how things go. CC: Sun C++ 5.10 SunOS_sparc 2009/06/03 -- Noel
participants (3)
-
Chris Hite
-
K. Noel Belcourt
-
Nat Goodspeed