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

Document const bindings #50

Open
poletti-marco opened this issue Jun 9, 2017 · 0 comments
Open

Document const bindings #50

poletti-marco opened this issue Jun 9, 2017 · 0 comments
Milestone

Comments

@poletti-marco
Copy link
Contributor

In some use cases of bindInstance, people might want to bind constants. To support this use case, the following changes are needed:

  • Change the normalization of const C, const C& and const C* to be const C (instead of C)
  • Forbid binding both const C and C (with tests)
  • When a const C binding is required, a C binding can satisfy this requirement (also add tests for this)
  • Add tests for bindInstance(const C&)
  • Document the caveat of bindInstance(const C&) (the reference must outlive the injector) and add a deleted bindInstance(C&&) overload to make sure temporaries are rejected.
  • Update comments and wiki to mention the new kind of binding, add examples to the reference documentation
@poletti-marco poletti-marco added this to the Fruit 2.1.0 milestone Jul 12, 2017
@poletti-marco poletti-marco modified the milestones: 3.0.0, Fruit 2.1.0 Jul 15, 2017
@poletti-marco poletti-marco changed the title Allow const bindings Document const bindings Sep 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant