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

fruit::Required doesn't work as expected in some cases #31

Closed
poletti-marco opened this issue Oct 23, 2016 · 1 comment
Closed

fruit::Required doesn't work as expected in some cases #31

poletti-marco opened this issue Oct 23, 2016 · 1 comment
Labels
Milestone

Comments

@poletti-marco
Copy link
Contributor

poletti-marco commented Oct 23, 2016

For example, this doesn't compile and it should.

#include <fruit/fruit.h>
struct X {
  virtual void foo() = 0;
};
using XFactory = std::function<std::unique_ptr<X>()>;
struct Y {
  INJECT(Y(XFactory)) {}
};
fruit::Component<fruit::Required<XFactory>, Y> getYComponent() {
    return fruit::createComponent();
}
@poletti-marco poletti-marco added this to the Fruit 2.1.0 milestone Oct 23, 2016
@poletti-marco
Copy link
Contributor Author

This works now, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant