void foo(const string& cstr) {
 string str = cstr;
 ・・・
 copy(str.begin(), cstr.end(), dest);

こんなエラーが検出できなくなるのが、ちと気になる。