Boost C++ Libraries: Ticket #2425: woption_from_option missing some fields https://svn.boost.org/trac10/ticket/2425 <p> As you known, woption_from_option funtion (parsers.cpp) could convert the char option to a wchar_t option. But it seems missing some fields when construct new object, such as original_tokens and unregistered. </p> <p> To fix, we could add two lines for missed fields </p> <blockquote> <p> woption woption_from_option(const option&amp; opt) { </p> <blockquote> <p> woption result; result.string_key = opt.string_key; result.position_key = opt.position_key; </p> </blockquote> </blockquote> <p> </p> <blockquote> <blockquote> <p> std::transform(opt.value.begin(), opt.value.end(), </p> <blockquote> <p> back_inserter(result.value), bind(from_utf8, _1)); </p> </blockquote> <p> <em> Missing two fields std::transform(opt.original_tokens.begin(), opt.original_tokens.end(), </em></p> <blockquote> <p> back_inserter(result.original_tokens), bind(from_utf8, _1)); </p> </blockquote> </blockquote> </blockquote> <blockquote> <blockquote> <p> result.unregistered = opt.unregistered; return result; </p> </blockquote> <p> } </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2425 Trac 1.4.3 Vladimir Prus Sat, 30 May 2009 10:34:38 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2425#comment:1 https://svn.boost.org/trac10/ticket/2425#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/53441" title="Properly convert original_tokens and unregistered to woption. Fixes ...">[53441]</a>) Properly convert original_tokens and unregistered to woption. </p> <p> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2425" title="#2425: Bugs: woption_from_option missing some fields (closed: fixed)">#2425</a>. </p> Ticket