Here is my code:
fs::path datadir = ...;
std::string dataDirOption((boost::format("--datadir=%1%") % datadir).str());
For datadir=="c:/db" I get dataDirOption=="--datadir=\"c:/db\"", instead of "--datadir=c:/db"
Is it possible to tell boost::filesystem::path to skip the quotes when being formatted?
Now, I know I can substitute datadir.string() for datadir and get rid of the quotes in this way, but I am wondering whether I can do so without the extra string.
Thanks.
I would suggest another option: post processing.
This way you can easily switch to another quote character like
'for example.