Maybe I am missing something obvious. Here is a short example:

Code:
#include <iostream>
#include <string>

using namespace std;

class sample {
public:
  sample(const string& val) : m_val(val) { };
  string val() { return m_val; };
protected:
  string m_val;
};

int main(int argc, char** argv)
{
  string val("foo");
  sample* s = new sample(val);
  /* set breakpoint here */
  cout << s->val() << endl;
  return 0;
}
If I set a break point where I have indicated above and
then use the evaluate panel to try to evaluate:

s->val()

I get the error:

Code:
calling functions which return an aggregate by value is not supported
If I have a function that returns an STL string, how can
I call it? Note: this example is purposefully simple. In the
real app, the string is computed (not stored).