di icon indicating copy to clipboard operation
di copied to clipboard

shared_config can't instance std::vector

Open qwertzui11 opened this issue 5 years ago • 0 comments

Thanks for the great lib. So far it just-works! Awesome! However I believe I found an issue.

the following code won't compile

class takes_vector {
 public:
  takes_vector(const std::vector<int>&);
};

void test {
  namespace di = boost::di;
  auto injector = di::make_injector<di::extension::shared_config>();
  injector.create<takes_vector>();
}

it works if:

  • di::extension::shared_config gets removed.
  • takes_vector(const std::vector<int>&); changes to takes_vector(std::vector<int>);

system: ubuntu 19.04 compiler: gcc 8/9 target architecture: arm language: c++17

maybe related issue: #311

qwertzui11 avatar May 09 '19 08:05 qwertzui11