ConvertOper::operator std::string() const tries to access a temporary variable after it is destroyed (xString becomes a reference to the deleted variable xTemp). Here's a fix:
ConvertOper::operator std::string() const {
const OPER *xString;
if (oper_->xltype == xltypeStr) {
xString = oper_;
} else {
Xloper xTemp;
Excel(xlCoerce, &xTemp, 2, oper_, TempInt(xltypeStr));
xString = &xTemp;
}
return strConv(xString);
}
Could be replaced with:
ConvertOper::operator std::string() const {
const OPER *xString;
if (oper_->xltype == xltypeStr) {
xString = oper_;
return strConv(xString);
} else {
Xloper xTemp;
Excel(xlCoerce, &xTemp, 2, oper_, TempInt(xltypeStr));
xString = &xTemp;
return strConv(xString);
}
}
If this is still relevant, may you open an issue at https://github.com/eehlers/QuantLibXL?