[reSIProcate] Does this is Data class bug ?

Theo Zourzouvillys theo at voip.co.uk
Fri Nov 28 10:07:15 CST 2008


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

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

theo at 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



More information about the resiprocate-devel mailing list