{"action":"created","issue":{"url":"https://api.github.com/repos/boost-experimental/di/issues/220","repository_url":"https://api.github.com/repos/boost-experimental/di","labels_url":"https://api.github.com/repos/boost-experimental/di/issues/220/labels{/name}","comments_url":"https://api.github.com/repos/boost-experimental/di/issues/220/comments","events_url":"https://api.github.com/repos/boost-experimental/di/issues/220/events","html_url":"https://github.com/boost-experimental/di/issues/220","id":162946863,"number":220,"title":"[error-message] When trying to instantiate a pure interface","user":{"login":"krzysztof-jusiak","id":1372601,"avatar_url":"https://avatars.githubusercontent.com/u/1372601?v=3","gravatar_id":"","url":"https://api.github.com/users/krzysztof-jusiak","html_url":"https://github.com/krzysztof-jusiak","followers_url":"https://api.github.com/users/krzysztof-jusiak/followers","following_url":"https://api.github.com/users/krzysztof-jusiak/following{/other_user}","gists_url":"https://api.github.com/users/krzysztof-jusiak/gists{/gist_id}","starred_url":"https://api.github.com/users/krzysztof-jusiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzysztof-jusiak/subscriptions","organizations_url":"https://api.github.com/users/krzysztof-jusiak/orgs","repos_url":"https://api.github.com/users/krzysztof-jusiak/repos","events_url":"https://api.github.com/users/krzysztof-jusiak/events{/privacy}","received_events_url":"https://api.github.com/users/krzysztof-jusiak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/boost-experimental/di/labels/bug","name":"bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-29T14:55:15Z","updated_at":"2016-06-29T15:22:49Z","closed_at":null,"body":"Error message should say that exactly the same as creating a pure interface"},"comment":{"url":"https://api.github.com/repos/boost-experimental/di/issues/comments/229391081","html_url":"https://github.com/boost-experimental/di/issues/220#issuecomment-229391081","issue_url":"https://api.github.com/repos/boost-experimental/di/issues/220","id":229391081,"user":{"login":"krzysztof-jusiak","id":1372601,"avatar_url":"https://avatars.githubusercontent.com/u/1372601?v=3","gravatar_id":"","url":"https://api.github.com/users/krzysztof-jusiak","html_url":"https://github.com/krzysztof-jusiak","followers_url":"https://api.github.com/users/krzysztof-jusiak/followers","following_url":"https://api.github.com/users/krzysztof-jusiak/following{/other_user}","gists_url":"https://api.github.com/users/krzysztof-jusiak/gists{/gist_id}","starred_url":"https://api.github.com/users/krzysztof-jusiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzysztof-jusiak/subscriptions","organizations_url":"https://api.github.com/users/krzysztof-jusiak/orgs","repos_url":"https://api.github.com/users/krzysztof-jusiak/repos","events_url":"https://api.github.com/users/krzysztof-jusiak/events{/privacy}","received_events_url":"https://api.github.com/users/krzysztof-jusiak/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T15:22:49Z","updated_at":"2016-06-29T15:22:49Z","body":"clang error\r\n```cpp\r\na.cpp:23:7: error: variable type 'A' is an abstract class\r\n auto object = injector.create<A>();  // can't work, same as A a;\r\n      ^\r\na.cpp:7:18: note: unimplemented pure virtual method 'x' in 'A'\r\n    virtual void x() = 0;\r\n                 ^\r\n1 error generated.\r\n```\r\n\r\ngcc error\r\n```cpp\r\na.cpp: In function ‘int main()’:\r\na.cpp:23:35: error: no matching function for call to ‘boost::di::v1_0_1::detail::<lambda(auto:1)> [with auto:1 = boost::di::v1_0_1::core::injector<boost::di::v1_0_1::config, boost::di::v1_0_1::core::pool<boost::di::v1_0_1::aux::type_list<> >, boost::di::v1_0_1::core::dependency<boost::di::v1_0_1::scopes::deduce, A, B, boost::di::v1_0_1::no_name, void> >]::i::create()’\r\n  auto object = injector.create<A>();  // can't work, same as A a;\r\n                                   ^\r\n\r\nIn file included from a.cpp:1:0:\r\ninclude/boost/di.hpp:2410:5: note: candidate: template<class T, typename boost::di::v1_0_1::aux::enable_if<boost::di::v1_0_1::core::injector<boost::di::v1_0_1::config, boost::di::v1_0_1::core::pool<boost::di::v1_0_1::aux::type_list<> >, boost::di::v1_0_1::core::dependency<boost::di::v1_0_1::scopes::deduce, A, B, boost::di::v1_0_1::no_name, void> >::is_creatable<T, boost::di::v1_0_1::no_name, boost::di::v1_0_1::aux::integral_constant<bool, true> >::value, int>::type <anonymous> > T boost::di::v1_0_1::core::injector<TConfig, boost::di::v1_0_1::core::pool<boost::di::v1_0_1::aux::type_list<> >, TDeps ...>::create() const [with T = T; typename boost::di::v1_0_1::aux::enable_if<boost::di::v1_0_1::core::injector<TConfig, boost::di::v1_0_1::core::pool<boost::di::v1_0_1::aux::type_list<> >, TDeps ...>::is_creatable<T, boost::di::v1_0_1::no_name, boost::di::v1_0_1::aux::integral_constant<bool, true> >::value, int>::type <anonymous> = <enumerator>; TConfig = boost::di::v1_0_1::config; TDeps = {boost::di::v1_0_1::core::dependency<boost::di::v1_0_1::scopes::deduce, A, B, boost::di::v1_0_1::no_name, void>}]\r\n   T create() const {\r\n     ^\r\n\r\ninclude/boost/di.hpp:2410:5: note:   template argument deduction/substitution failed:\r\ninclude/boost/di.hpp: In substitution of ‘template<class T, typename boost::di::v1_0_1::aux::enable_if<boost::di::v1_0_1::core::injector<boost::di::v1_0_1::config, boost::di::v1_0_1::core::pool<boost::di::v1_0_1::aux::type_list<> >, boost::di::v1_0_1::core::dependency<boost::di::v1_0_1::scopes::deduce, A, B, boost::di::v1_0_1::no_name, void> >::is_creatable<T, boost::di::v1_0_1::no_name, boost::di::v1_0_1::aux::integral_constant<bool, true> >::value, int>::type <anonymous> > T boost::di::v1_0_1::core::injector<TConfig, boost::di::v1_0_1::core::pool<boost::di::v1_0_1::aux::type_list<> >, TDeps ...>::create() const [with T = A; typename boost::di::v1_0_1::aux::enable_if<boost::di::v1_0_1::core::injector<boost::di::v1_0_1::config, boost::di::v1_0_1::core::pool<boost::di::v1_0_1::aux::type_list<> >, boost::di::v1_0_1::core::dependency<boost::di::v1_0_1::scopes::deduce, A, B, boost::di::v1_0_1::no_name, void> >::is_creatable<T, boost::di::v1_0_1::no_name, boost::di::v1_0_1::aux::integral_constant<bool, true> >::value, int>::type <anonymous> = <missing>]’:\r\na.cpp:23:35:   required from here\r\ninclude/boost/di.hpp:2410:5: error: invalid abstract return type ‘A’\r\na.cpp:5:8: note:   because the following virtual functions are pure within ‘A’:\r\n struct A {\r\n        ^\r\n\r\na.cpp:7:18: note: \tvirtual void A::x()\r\n     virtual void x() = 0;\r\n                  ^\r\n\r\nIn file included from a.cpp:1:0:\r\ninclude/boost/di.hpp:2417:3: note: candidate: template<class T, typename boost::di::v1_0_1::aux::enable_if<(! boost::di::v1_0_1::core::injector<boost::di::v1_0_1::config, boost::di::v1_0_1::core::pool<boost::di::v1_0_1::aux::type_list<> >, boost::di::v1_0_1::core::dependency<boost::di::v1_0_1::scopes::deduce, A, B, boost::di::v1_0_1::no_name, void> >::is_creatable<T, boost::di::v1_0_1::no_name, boost::di::v1_0_1::aux::integral_constant<bool, true> >::value), int>::type <anonymous> > T boost::di::v1_0_1::core::injector<TConfig, boost::di::v1_0_1::core::pool<boost::di::v1_0_1::aux::type_list<> >, TDeps ...>::create() const [with T = T; typename boost::di::v1_0_1::aux::enable_if<(! boost::di::v1_0_1::core::injector<TConfig, boost::di::v1_0_1::core::pool<boost::di::v1_0_1::aux::type_list<> >, TDeps ...>::is_creatable<T, boost::di::v1_0_1::no_name, boost::di::v1_0_1::aux::integral_constant<bool, true> >::value), int>::type <anonymous> = <enumerator>; TConfig = boost::di::v1_0_1::config; TDeps = {boost::di::v1_0_1::core::dependency<boost::di::v1_0_1::scopes::deduce, A, B, boost::di::v1_0_1::no_name, void>}]\r\n   create\r\n   ^\r\n\r\ninclude/boost/di.hpp:2417:3: note:   template argument deduction/substitution failed:\r\ninclude/boost/di.hpp: In substitution of ‘template<class T, typename boost::di::v1_0_1::aux::enable_if<(! boost::di::v1_0_1::core::injector<boost::di::v1_0_1::config, boost::di::v1_0_1::core::pool<boost::di::v1_0_1::aux::type_list<> >, boost::di::v1_0_1::core::dependency<boost::di::v1_0_1::scopes::deduce, A, B, boost::di::v1_0_1::no_name, void> >::is_creatable<T, boost::di::v1_0_1::no_name, boost::di::v1_0_1::aux::integral_constant<bool, true> >::value), int>::type <anonymous> > T boost::di::v1_0_1::core::injector<TConfig, boost::di::v1_0_1::core::pool<boost::di::v1_0_1::aux::type_list<> >, TDeps ...>::create() const [with T = A; typename boost::di::v1_0_1::aux::enable_if<(! boost::di::v1_0_1::core::injector<boost::di::v1_0_1::config, boost::di::v1_0_1::core::pool<boost::di::v1_0_1::aux::type_list<> >, boost::di::v1_0_1::core::dependency<boost::di::v1_0_1::scopes::deduce, A, B, boost::di::v1_0_1::no_name, void> >::is_creatable<T, boost::di::v1_0_1::no_name, boost::di::v1_0_1::aux::integral_constant<bool, true> >::value), int>::type <anonymous> = <missing>]’:\r\na.cpp:23:35:   required from here\r\ninclude/boost/di.hpp:2417:3: error: invalid abstract return type ‘A’\r\n```\r\n\r\nmsvc error\r\n```cpp\r\nain.cpp(3003): error C2672: 'boost::di::v1_0_1::core::injector<TConfig,boost::di::v1_0_1::core::pool<boost::di::v1_0_1::aux::type_list<>>,boost::di::v1_0_1::core::dependency<TScope,TExpected,T,TName,TPriority>>::create': no matching overloaded function found\r\n        with\r\n        [\r\n            TConfig=boost::di::v1_0_1::config,\r\n            TScope=boost::di::v1_0_1::scopes::deduce,\r\n            TExpected=A,\r\n            T=B,\r\n            TName=boost::di::v1_0_1::no_name,\r\n            TPriority=void\r\n        ]\r\nmain.cpp(3003): error C2770: invalid explicit template argument(s) for 'T boost::di::v1_0_1::core::injector<TConfig,boost::di::v1_0_1::core::pool<boost::di::v1_0_1::aux::type_list<>>,boost::di::v1_0_1::core::dependency<TScope,TExpected,T,TName,TPriority>>::create(void) const'\r\n        with\r\n        [\r\n            TConfig=boost::di::v1_0_1::config,\r\n            TScope=boost::di::v1_0_1::scopes::deduce,\r\n            TExpected=A,\r\n            T=B,\r\n            TName=boost::di::v1_0_1::no_name,\r\n            TPriority=void\r\n        ]\r\nmain.cpp(2419): note: see declaration of 'boost::di::v1_0_1::core::injector<TConfig,boost::di::v1_0_1::core::pool<boost::di::v1_0_1::aux::type_list<>>,boost::di::v1_0_1::core::dependency<TScope,TExpected,T,TName,TPriority>>::create'\r\n        with\r\n        [\r\n            TConfig=boost::di::v1_0_1::config,\r\n            TScope=boost::di::v1_0_1::scopes::deduce,\r\n            TExpected=A,\r\n            T=B,\r\n            TName=boost::di::v1_0_1::no_name,\r\n            TPriority=void\r\n        ]\r\n\r\n```"}}
{"actor":{"display_login":"krzysztof-jusiak"}}