2015-12-28 11:58 GMT+01:00 dariomt
Piotr Kowalski
writes: Are you using solaris studio 12.3 or older?Before version 12.4 there
was a bug where partial specialization for templates with same name but in different namespaces (basic_string in std:: and boost::container:: in this case) was considered ambiguous.
A workaround for this problem (I would recommend using solaris studio 12.4) can be found here: https://community.oracle.com/thread/3706125
Thanks for the info and the link!
It seems to be 12.1 $ CC -V CC: Sun C++ 5.10 SunOS_i386 Patch 128229-32 2013/12/04
It's not easy to change the compiler, it might not be possible *at all* for this specific project.
I know what that means, we have similar problems in our project which is why I had investigated this specialization bug and found a workaround.
For now I'll #ifdef out the specializations for boost::container::basic_string.
This is ok if you are not going to use boost::container in your project.
In the link from Oracle forum you can find a discussion on how to have all
specializations available while keeping CC happy.
The more general solution (required if you want to have an official Boost
patch) which worked for me with Boost 1.57.0 involved changing 2 files:
1. boost/config/compiler/sunpro_cc.hpp (put this at the end of file)
#if __SUNPRO_CC < 0x5130
// C++ up till 12.3 has a bug when partial specialization is for a template
that only differs in namespace
// (like std::basic_string and boost::container::basic_string)
#define BOOST_DETAIL_SUNPRO_PARTIAL_SPEC_IN_DIFFERENT_NS_BUG 1
namespace boost {
namespace detail {
namespace sunpro_cc_aux {
template
Probably it should first be reported as a bug to get a number. This is a
question to the Boost developers - I am not one, I am just a Boost user capable of fixing Sun C++-related bugs for my project. I am also too lazy to investigate Boost development process myself _______________________________________________
Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users