Skip to content
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

Fix NotifyWhenAutowired not working with some types #972

Merged
merged 2 commits into from
Aug 5, 2016

Conversation

yeswalrus
Copy link
Contributor

In order to work correctly the type must first be registered using auto_id_t. By adding the registration in the call to NotifyWhenAutowired, this problem is prevented at the expense of disallowing calls to NotifyWhenAutowired on forward declared types

Autowired<ForwardDeclared> decl;
decl.NotifyWhenAutowired([]() {std::cout << "thing"; });
}
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No - I'm not sure how we want to handle the documentation of compile time failures? I'd like to leave it in

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I missed the part where you commented about what the failure should be.

I've thought about this, I experimented with CMake's try_compile feature, but decided against using that for things that aren't build environment provisioning.

@codemercenary codemercenary self-assigned this Aug 5, 2016
@codemercenary codemercenary added this to the v1.0.3 milestone Aug 5, 2016
@codemercenary codemercenary merged commit 87d00e2 into master Aug 5, 2016
@codemercenary codemercenary deleted the fix-inject-trigger branch August 5, 2016 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants