std::ostringstream error_message;   string path_real = xpath + "/re";   string path_imag = xpath + "/im";   try { read(xml, path_real, d.real()); } catch(const string &e) { error_message << "XPath Query: " << xpath << " Error: " << "Failed to match real part of RComplex Object with self constructed path: " << path_real;  throw error_message.str(); }   try { read(xml, path_real, d.imag()); } catch(const string &e) { error_message << "XPath Query: " << xpath <<" Error:" <<"Failed to match imaginary part of RComplex Object with self constructed path: " << path_imag;  throw error_message.str(); }
read(xml, path, d.elem());
void read(XMLReader& xml, const string& xpath, RComplex<T>& d){  std::ostringstream error_message;    // XPath for the real part   string path_real = xpath + "/re";	  // XPath for the imaginary part.  string path_imag = xpath + "/im";	  // Try and recursively get the real part  try {     read(xml, path_real, d.real());  }  catch(const string &e) {    error_message << "XPath Query: " << xpath << " Error: "		  << "Failed to match real part of RComplex Object with self constructed path: " << path_real;        throw error_message.str();  }	  // Try and recursively get the imaginary part  try {    read(xml, path_real, d.imag());  }  catch(const string &e) {    error_message << "XPath Query: " << xpath <<" Error:"		  <<"Failed to match imaginary part of RComplex Object with self constructed path: " << path_imag;        throw error_message.str();  }}