Factory with of object with shared_ptr parameter not compiling on gcc 13.2.1 and gcc 12.2.1 · Issue #559 · boost-ext/di · GitHub
More Web Proxy on the site http://driver.im/
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
Dear,
This code is working fine :
But this one does not compile :
Output is :
In file included from workdir/lib/boost/di/extension/injections/factory.hpp:11, from workdir/tests/example2.cpp:1: workdir/lib/boost/di.hpp: In instantiation of 'struct boost::ext::di::v1_3_0::aux::concept_check<boost::ext::di::v1_3_0::concepts::type_<std::shared_ptr<int> >::has_disallowed_qualifiers>': workdir/lib/boost/di.hpp:1998:9: required from 'std::unique_ptr<I> boost::ext::di::v1_3_0::extension::factory_impl<TInjector, T, boost::ext::di::v1_3_0::extension::ifactory<I, TArgs ...> >::create(TArgs&& ...) const [with TInjector = boost::ext::di::v1_3_0::core::injector<boost::ext::di::v1_3_0::config, boost::ext::di::v1_3_0::core::pool<boost::ext::di::v1_3_0::aux::type_list<> >, boost::ext::di::v1_3_0::core::dependency<boost::ext::di::v1_3_0::scopes::instance, boost::ext::di::v1_3_0::extension::ifactory<Interface, std::shared_ptr<int> >, boost::ext::di::v1_3_0::extension::factory<Implementation>, boost::ext::di::v1_3_0::no_name, void, boost::ext::di::v1_3_0::core::none> >; T = Implementation; I = Interface; TArgs = {std::shared_ptr<int>}]' workdir/lib/boost/di/extension/injections/factory.hpp:30:22: required from here workdir/lib/boost/di.hpp:379:20: error: static assertion failed: constraint not satisfied 379 | static_assert(T::value, "constraint not satisfied"); | ^~~~~ compilation terminated due to -Wfatal-errors. make[2]: *** [CMakeFiles/tu_5_framework.dir/build.make:90: CMakeFiles/tu_5_framework.dir/5_framework/tests/example2.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:485: CMakeFiles/tu_5_framework.dir/all] Error 2 make: *** [Makefile:91: all] Error 2
How to fix this code ? Thanks for your reply.
Regards,
XS
The text was updated successfully, but these errors were encountered: