boost-ext / di

C++14 Dependency Injection Library
https://boost-ext.github.io/di
1.16k stars 140 forks source link

Fix extensible injector #451

Closed kanstantsin-chernik closed 4 years ago

kanstantsin-chernik commented 4 years ago

Problem: is_referable in dependency_proxy is not accessable


Error   C2248   'boost::di::v1_1_0::extension::dependency_proxy<boost::di::v1_1_0::scopes::instance,interface,boost::di::v1_1_0::extension::shared_factory_impl<T,false,TFunc>,boost::di::v1_1_0::no_name,void,boost::di::v1_1_0::core::none>::is_referable<const interface&,config>': cannot access protected member declared in class 'boost::di::v1_1_0::extension::dependency_proxy<boost::di::v1_1_0::scopes::instance,interface,boost::di::v1_1_0::extension::shared_factory_impl<T,false,TFunc>,boost::di::v1_1_0::no_name,void,boost::di::v1_1_0::core::none>'

Solution: Just make it public. Unlike dependency there is no reason to hide these members

Issue: #

Reviewers: @krzysztof-jusiak

kanstantsin-chernik commented 4 years ago

It is reproducible only in VS2019.

Also I don't think it worth a separate test.

kanstantsin-chernik commented 4 years ago

Also tried friend class. It didn't work out

krzysztof-jusiak commented 4 years ago

:+1: Thanks, @kanstantsin-chernik