3

I am having issues with c++ (c++11)

this code:

void execute(std::vector<boost::variant<int, std::string>> params){
   printf("There are %d parameters\n", params.size());
}

execute( { 21, "test", 98 } );

fails with:

error: no matching function for call to ‘execute(<brace-enclosed initializer list>)
Cheyenne Forbes
  • 491
  • 1
  • 5
  • 15

0 Answers0