I can get the compiler (msvc++ express) to convert "string" as a CustomString in a constructor, but not with a reference. Will it therefore not have the same chance of being optimized out with a pass-by-reference anyway, like passing by value with other types can, if the compiler thinks it can?
won't implicit convert using
new xmlNode("string")
:
xmlNode( CustomString& label )
{
this->text = label;
}
will :
xmlNode( CustomString label )
{
this->text = label;
}