< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate] Does this is Data class bug ?


On Fri, Nov 28, 2008 at 11:43 AM, Karlsson <boost.regex@xxxxxxxxx> wrote:
>  host += port;

take a look at the 3 signatures for operator+= on Data:

theo@syndev-03 ~ $ grep 'operator+=' /usr/include/rutil/Data.hxx
      Data& operator+=(const Data& rhs);
      Data& operator+=(const char* str);
      Data& operator+=(char c);

the compiler will be converting operator+=(int) to operator+=(char),
which will eb the same as calling operator+=(-112).

 ~ Theo

-- 
Theo Zourzouvillys
Chief Technical Officer
VoIP.co.uk - Commerce House, Telford Road, Bicester, OX26 4LD
Tel: +44 1908 764 196