-
-
Save milleniumbug/1ced08381836a2d4484b to your computer and use it in GitHub Desktop.
exception throwing constructor, usage of naked new and RAII problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstdlib> | |
int main() | |
{ | |
try | |
{ | |
my::Type instance {1, true, "hello"}; | |
std::cout << instance << std::endl; | |
} | |
catch (/* error */) | |
{ | |
/* report */ | |
return EXIT_FAILURE; | |
} | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment