Custom validator for boost program_options doesn't work with GCC, works with MSVC
问题 Let's say I would like special processing for integer options. According to the documentation I have to write my own validate function. Consider the following short program. #include <iostream> #include <vector> #include <string> #include <boost/program_options.hpp> namespace po = boost::program_options; namespace boost { namespace program_options { template <class charT> void validate(boost::any& v, const std::vector<std::basic_string<charT> >& xs, unsigned int*, int) { std::cout <<