How to parse comma separated values with boost::program_options?
I need to parse cmd like -value=str1,str2,str3 using boost::program_options . I've found exactly the same question but it's not working anymore (with boost 1.55 and 1.56). I've tried to define my own class and mapper but no luck: namespace po = boost::program_options; desc.add_options() ("mattr", po::value<lli::CommaSeparatedVector>(&MAttrs), "Target specific attributes (-mattr=help for details)"); namespace lli { class CommaSeparatedVector { public: // comma separated values list std::vector<std::string> values; }; } void tokenize(const std::string& str, std::vector<std::string>& tokens,