Boost logo

Boost Users :

Subject: [Boost-users] [program_options] escaping literal hash symbol for parse_config_file
From: Rhys Ulerich (rhys.ulerich_at_[hidden])
Date: 2011-03-04 11:52:06


Hi all,

With boost::program_options::parse_config_file, is there any way to
escape a literal hash symbol ('#')?

I want to set std::string-based option 'foo' to contain the var
'bar#baz', but the sensible-seeming
   foo=bar\#baz
fails in that 'foo' only contains 'bar'. Other variants on quoting
and escaping also fail.

The source for common_config_file_iterator::get() in config_file.cpp
seems to indicate this isn't possible.
Can anyone confirm or deny that?

Thanks,
Rhys


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net