Closed kanstantsin-chernik closed 5 years ago
Final class is bound successfully
di.hpp(618): error C3246: 'boost::di::v1_1_0::aux::callable_base<T>': cannot inherit from 'impl1_final' as it has been declared as 'final'
#include "boost/di.hpp" #include <memory> namespace di = boost::di; struct i1 { virtual ~i1() noexcept = default; virtual void dummy1() = 0; }; struct impl1_final final : i1 { void dummy1() override {} }; test bind_final_class_instance = [] { auto injector = di::make_injector(di::bind<impl1_final>().to([](){return std::make_unique<impl1_final>();})); auto object = injector.create<std::unique_ptr<impl1_final>>(); expect(dynamic_cast<impl1_final *>(object.get())); };
is_invocable doesn't work the same way as is_callable because of msvc issue. As soon as fix will be released will be able to reuse
is_invocable
is_callable
Expected Behavior
Final class is bound successfully
Actual Behavior
di.hpp(618): error C3246: 'boost::di::v1_1_0::aux::callable_base<T>': cannot inherit from 'impl1_final' as it has been declared as 'final'
Steps to Reproduce the Problem
Specifications