Great question. There are multiple ways of distinguishing them but IMHO
strong types would be the most elegant/encouraged when used with DI.
struct X {
name_t name;
};
struct Y {
title_t title
};
auto injector = di::make_injector(
bind
Krzysztof Jusiak wrote:
documentation: https://boost-ext.github.io/di/
This brings up one pretty obvious question, what if I have two constructor parameters of the same type:
struct X { std::string name; };
struct Y { std::string title; };
struct Z { X x; Y y; };
How do I inject specific values for X::name and Y::title?
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost