Exemple #1
0
void foo (void)
{
  S *result;
  S local_S;

  /* We can't perform return slot optimization because global_S is
     global and may be clobbered by nrv_candidate.  */
  result = &global_S;
  *result = nrv_candidate ();
  use_result (*result);

  /* We can't perform return slot optimization because local_S is
     call_clobbered (its address escapes prior to invoking
     nrv_candidate).  */
  make_escape (&local_S);
  result = &local_S;
  *result = nrv_candidate ();
  use_result (*result);
}
Exemple #2
0
string sqlinc::query(string in_string)
{
	int return_val = mysql_real_query(mysql, in_string.c_str(), (unsigned) in_string.length());

	if (return_val == 0)
	{
		use_result();
		return "All Good";
	}
	else
	{
		return "Unknown Query Error";
	}
}