I have a legacy C++
Application ( Solaris Sun CC 5.6
compiled) which uses xercers XML parcer v1.6.0
from ages
. All good sofar.
Recently one other third-party libraries upgrade forced us to use boost libraries along with Sun CC 5.9
compiler.
But we started seeing below issue while integrating boost libraries, operator overloading ambiguity error between boost include code and xercer librabry;
Error:
/app/home/build/thirdpaty/boost/include/boost/date_time/gregarian_calendar.ipp", line 79, Error: Overloading ambiguity between "operator+ (usigned short, const DOMString&)" and "operator+(int,int)".
"/app/home/build/thirdpaty/boost/include/boost/date_time/gregarian_calendar.ipp", line 79, Error: The operation "DOMString - unsigned short" is illegal.
Now, verified all namespaces and all ok. I didnt' include even namespace boost too; Also no code is referring operator + from code( commented all '+' code too)
Can you please suggest how to integrate both boost and xercer xml parcer libs without any ambiguity errors, any namespace hacks sothat both should work? I cannot modify xercer library headers and boost headers as well and error also showing in date_time header file. Please can you throw some light how to appraoch and what to make sure?
I am including below boost flags:
-DBOOST_TYPEOF_NATIVE -DBOOST_TYPEOF_KEYWORD=__typeof__ -DNO_INLINE_VIRTUALS -DBOOST_ALL_NO_LIB -DFAST_CONVERT -DBOOST_ENABLE_ASSERT_HANDLER
(somehow I include -DBOOST_NO_DATE_TIME_INLINE
, above problem resolved but compiler
has given seg fault in cg)