Ganesh Gella wrote:
Hi All,
At some places in code, I see following statements,
const XMLCh* some_func()
{
return &*(*i)->m_Value.begin();
}
If the value returned by begin() has an overload for operator*
(or the result of *begin() has an overload for &), it's not the
same as omitting the &*.
For example if m_Value is list<XMLCh> type, then begin() returns
list<XLMCh>::iterator which is NOT the same as XMLCh*. It does
however have an operator* that reutrns XMLCh& and you can take the
address of that to get the adderss of the XMLCh object in the list.