4 ms·
Why would you prefer that over: throw exceptionC("error code: ", t); ? Ever since perfect forwarding I've been using this pattern to get out of arrow hell:
by codr7 3y ago
Why would you prefer that over:
throw exceptionC("error code: ", t);
?
Ever since perfect forwarding I've been using this pattern to get out of arrow hell:
template <typename Arg, typename...Args>
string to_string(Arg &&arg, Args &&...args) {
stringstream buf;
buf << arg;
((buf << std::forward<Args>(args)), ...);
return buf.str();
}