2 // { dg-options "-std=c++11" }
3 // { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
8 const std::string err_prefix = "Problem: ";
9 void thrower (std::string msg)
11 throw std::runtime_error(err_prefix + std::move(msg));
14 int main(int argc, char **argv)
17 std::string base = "hello";
18 thrower(std::move(base));
19 } catch (const std::runtime_error &e) {