Opened 9 years ago

Last modified 9 years ago

#9188 new Bugs

named_slot_map.cpp fails to build in Solaris Studio 12.3

Reported by: Brian Vandenberg <phantall+boost@…> Owned by: Douglas Gregor
Milestone: To Be Determined Component: signals
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc: Brian, Vandenberg, <phantall+boost@…>

Description

I'm getting an "Overloading ambiguity error" when building libs/signals/src/named_slot_map.cpp on or around lines 105 & 128 on the calls to groups.erase.

This may be related to an issue talked about here, but that issue seems to indicate the problem would only exist in C++11.

The error goes away with the following minor edits:

-105:     groups.erase((const_group_iterator) group);
+105:     groups.erase(*(const_group_iterator) group);
-128:     if (empty(g)) groups.erase((const_group_iterator) g++);
+128:     if (empty(g)) groups.erase(*(const_group_iterator) g++);

I'm doing this work on an airgapped network, and the error is rather verbose ... but I'll give a shorted version of the error:

"libs/signals/src/named_slot_map.cpp", line 105: Overloading ambiguity between "std::map<A>::erase( __rw::__rw_tree_iter<B> )" and "std::map<A>::erase(const  boost::signals::detail::stored_group&)".
"libs/signals/src/named_slot_map.cpp", line 128: Overloading ambiguity between "std::map<A>::erase( __rw::__rw_tree_iter<B> )" and "std::map<A>::erase(const  boost::signals::detail::stored_group&)".

Change History (2)

comment:1 by viboes, 9 years ago

Component: Nonesignals
Owner: set to Douglas Gregor

comment:2 by Brian Vandenberg <phantall+boost@…>, 9 years ago

I forgot to mention I was building this with apache's STL implementation; to do that you'd have to have it built/installed, and change anything using stlport4 to use stdcxx4 -- eg:

gsed -i -e 's/stlport4/stdcxx4/g' tools/build/v2/tools/sun.jam boost/tr1/detail/config_all.hpp

This may be an issue in stlport4 as well, but I had no reason to test that.

Note: See TracTickets for help on using tickets.