We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As mentioned in travisdowns/uarch-bench#39, it would be nice to have a macro which attempts to register a constructor function.
GLib has some code to do this already for GCC, Windows, and suncc. I'd probably want to at least a C++ version… something like (untested):
#if defined(__cplusplus) #define PSNIP_CONSTRUCTOR(func_name) \ static class func_name#_psnip_constructor_class_ { \ public: \ func_name#_psnip_constructor_class_(int x) { \ (void) x; \ func_name(); \ } \ } func_name#_psnip_constructor_(42); #elif ... /* ... */ #endif
The text was updated successfully, but these errors were encountered:
No branches or pull requests
As mentioned in travisdowns/uarch-bench#39, it would be nice to have a macro which attempts to register a constructor function.
GLib has some code to do this already for GCC, Windows, and suncc. I'd probably want to at least a C++ version… something like (untested):
The text was updated successfully, but these errors were encountered: