#include <boost/program_options.hpp>

namespace po = boost::program_options;

namespace
{

po::options_description desc;
std::string help_string;

}

std::pair<std::string, std::string> fix_option(const std::string& value)
{
   std::string name = value;
   std::string val;
   std::string::size_type pos = name.find("=");
   if (pos != std::string::npos)
   {
      val = name.substr(pos + 1);
      name = name.substr(0, pos);
   }
   if (name.substr(0, 2) != "--")
   {
      throw std::logic_error(std::string("invalid command, no -- in command: ") + name);
   }
   return std::make_pair(name.substr(2), val);
}

int main(int argc, char* argv[])
{
   desc.add_options()
      ("help", po::value<std::string>(&help_string), "produce help");
   po::variables_map vm;
   po::parsed_options allowed = po::command_line_parser(argc, argv).options(desc).
      extra_parser(fix_option).run();
   po::store(allowed, vm);
   po::notify(vm);
   std::cout << help_string << std::endl;
}