This has nothing to with boost or memorymapping.
Firstly
str.unsetf(std::ios::skipws);
will prevent whitespace from being used as delimiter/skipped.
Secondly, I think (you don't mention any of that) you wanted to read by line:
for(std::string x; std::getline(str, x, '\n');)
{
app.push_back(x);
}
As you can see you can already specify the delimiter.
Lastly, consider using a parser generator. See e.g. here:
Which contains an example that uses Boost Spirit to parse from a memory-mapped file.