const std::string& stock_name

to pass by reference use boost::ref, see below