Boost Program_Options throws "character conversion failed"
<p>I am on Ubuntu 14.04, using CMake and CLion. I am trying to use Program Options, with the following code taken from an example in their documentation:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;boost/program_options.hpp&gt;

int main(int ac, char* av[]) {
    namespace po = boost::program_options;
    using namespace std;

    po::options_description desc("Allowed options");
    desc.add_options()
            ("help", "produce help message")
            ("compression", po::value&lt;int&gt;(), "set compression level")
            ;

    po::variables_map vm;
    po::store(po::parse_command_line(ac, av, desc), vm);
    po::notify(vm);

    if (vm.count("help")) {
        cout &lt;&lt; desc &lt;&lt; "\n";
        return 1;
    }

    if (vm.count("compression")) {
        cout &lt;&lt; "Compression level was set to "
        &lt;&lt; vm["compression"].as&lt;int&gt;() &lt;&lt; ".\n";
    } else {
        cout &lt;&lt; "Compression level was not set.\n";
    }
}
</code></pre>

<p>When I run it, I get the following output from the terminal:</p>

<pre><code>$ ./bin/webserver --help
terminate called after throwing an instance of 'boost::exception_detail::clone_impl&lt;boost::exception_detail::error_info_injector&lt;std::logic_error&gt; &gt;'
  what():  character conversion failed
Aborted (core dumped)
</code></pre>

<p>Why is that not working and how can I solve it?</p>

<p><strong>EDIT:</strong> After some debugging, I found that the problem comes from the line with <code>store</code>, if this is of any help for you. Also, I have to mention I tried using <code>store(..., true)</code> (setting <code>unicode</code> to <code>true</code>)</p>