New issue
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
Improve runtime performance and clang++ compatibility #2
Conversation
`holder_cont` is an alias for holder container class.
Use static_cast instead of dynamic_cast when possible.
Use `std::move` for shared pointers. This is faster than simple copy.
Add `diagnostic ignored` for C++98 and weak vtables. Convert Holder, CallbackHolder, InstanceHolder and Container from struct to class. Fix `enable_if` for clang++. Remove unused variables. Replace `getCallback` function with `operator ()` in CallbackHolder class.
Add `final` keyword to CallbackHolder and InstanceHolder classes.
#pragma clang diagnostic push | ||
#pragma clang diagnostic ignored "-Wc++98-compat" | ||
#pragma clang diagnostic ignored "-Wc++98-compat-pedantic" | ||
#pragma clang diagnostic ignored "-Wweak-vtables" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is needed to remove clang warnings for inlined virtual destructors.
I kept classes as struct, public inheritance by default is why less obfuscating is think (maybe the Container should be a class because of the private?? let me know) |
tested everything with clang++ 3.6.0 and g++ 4.9.2 |
thank you again, this makes the tool even greater and faster. Your efforts are always welcome. |
I renamed |
ok, I reverted back the change and put the |
Hi, I made some important changes for the next version, including having service managed by unique_ptr and raw pointers. I added the feature to have additional parameters in the constructor after the dependencies ( that feature might need some work ) |
What's new: