```cpp #include <iostream> #include <string> struct MyException { const std::string& msg; MyException(const std::string& s) : msg(s) { } }; int main(int argc, char** argv) { for (int i = 0; i < argc; ++i) { try { throw MyException(argv[i]); } catch (const MyException& e) { std::cerr << e.msg << std::endl; } } } ```
Activity
[-]Lifetime issue with cons member field[/-][+]Lifetime issue with const member field[/+]