Boost C++ Libraries: Ticket #12493: Compile error in boost::intrusive with Sun compiler 12.4 https://svn.boost.org/trac10/ticket/12493 <p> When trying to compile the unit tests in boost::container, I get compile errors in boost/intrusive/detail/to_raw_pointer.hpp on Sun with the 12.4 Sun Studio compiler in non-C++11 mode when using the ancient STLport 4.5. </p> <p> "/boost/intrusive/detail/to_raw_pointer.hpp", line 41: Error: Variable p of type void*const is not a structure. "/boost/container/detail/multiallocation_chain.hpp", line 66: Where, temwhileinst: While instantiating "boost::intrusive::detail::to_raw_pointer&lt;void*&gt;(void*const&amp;)". "/boost/boost/container/detail/multiallocation_chain.hpp", line 66: Where, teminstend: Instantiated from non-template code. </p> <p> For me it seems that the Sun compiler picks the wrong overload here. Why is the code there not "disambiguated" via boost::enable_if? </p> <p> The following code seems to work: </p> <p> template&lt;class Pointer&gt; inline typename boost::intrusive::pointer_element&lt;Pointer&gt;::type* to_raw_pointer(const Pointer &amp;p, typename boost::disable_if&lt;boost::is_pointer&lt;Pointer&gt; &gt;::type * = 0) { ... } </p> <p> At least, the unit tests are running. </p> <p> The code in this file did not change in this regards in Boost 1.61. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12493 Trac 1.4.3