[Boost-bugs] [Boost C++ Libraries] #12493: Compile error in boost::intrusive with Sun compiler 12.4

Subject: [Boost-bugs] [Boost C++ Libraries] #12493: Compile error in boost::intrusive with Sun compiler 12.4
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-09-30 16:21:28


#12493: Compile error in boost::intrusive with Sun compiler 12.4
------------------------------+------------------------
 Reporter: kilian.kilger@… | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: intrusive
  Version: Boost 1.58.0 | Severity: Problem
 Keywords: |
------------------------------+------------------------
 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.

 "/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<void*>(void*const&)".
 "/boost/boost/container/detail/multiallocation_chain.hpp", line 66:
 Where, teminstend: Instantiated from non-template code.

 For me it seems that the Sun compiler picks the wrong overload here. Why
 is the code there not "disambiguated" via boost::enable_if?

 The following code seems to work:

 template<class Pointer>
 inline typename boost::intrusive::pointer_element<Pointer>::type*
 to_raw_pointer(const Pointer &p, typename
 boost::disable_if<boost::is_pointer<Pointer> >::type * = 0)
 { ... }

 At least, the unit tests are running.

 The code in this file did not change in this regards in Boost 1.61.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12493>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC