You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
In some use cases of
bindInstance
, people might want to bind constants. To support this use case, the following changes are needed:const C
,const C&
andconst C*
to beconst C
(instead ofC
)const C
andC
(with tests)const C
binding is required, aC
binding can satisfy this requirement (also add tests for this)bindInstance(const C&)
bindInstance(const C&)
(the reference must outlive the injector) and add a deletedbindInstance(C&&)
overload to make sure temporaries are rejected.The text was updated successfully, but these errors were encountered: