TCLAP issus with parsing std::wstring
<p>TCLAP <code>std::wstring</code> issue. 
Hello All, </p>

<p>I am using TCLAP(command line parsing utility). It has worked well so far until I ran into issues with wstring processing capability. </p>

<p>I have the below line to parse code for an UnlabeledValueArg </p>

<pre><code>std::wstring defaultValue; 

UnlabeledValueArg&lt;std::wstring&gt;
serverName("COMPUTERNAME", "List all scheduled tasks of computer", false,
           defaultValue, "string" );
</code></pre>

<p>I run into compile time issues ( Visual Studio spits out incredulous amounts of issues.). My question is have anyone tried using std::wstring with TCLAP. If yes can you post the solution or the approach to it. Thanks. </p>

<p>Edit - The compiler warnings I get is - </p>

<blockquote>
  <p>C:\DevProjects\MyProjects\nttoolkit\trunk\external\tclap/StandardTraits.h(187)
  : error C2679: binary '=' : no
  operator found which takes a
  right-hand operand of type 'const
  std::string' (or there is no
  acceptable conversion)</p>

<pre><code>    c:\Program Files (x86)\Microsoft Visual Studio
</code></pre>
  
  <p>9.0\VC\include\xstring(914): could be 'std::basic_string&lt;_Elem,_Traits,_Ax></p>
  
  <p>&amp;std::basic_string&lt;_Elem,_Traits,_Ax>::operator</p>
  
  <p>=(const std::basic_string&lt;_Elem,_Traits,_Ax>
  &amp;)'
          with
          [
              _Elem=wchar_t,
              _Traits=std::char_traits,
              _Ax=std::allocator
          ]</p>

<pre><code>    c:\Program Files (x86)\Microsoft Visual Studio
</code></pre>
  
  <p>9.0\VC\include\xstring(919): or       'std::basic_string&lt;_Elem,_Traits,_Ax>
  &amp;std::basic_string&lt;_Elem,_Traits,_Ax>::operator
  =(const _Elem *)'
          with
          [
              _Elem=wchar_t,
              _Traits=std::char_traits,
              _Ax=std::allocator
          ]</p>

<pre><code>    c:\Program Files (x86)\Microsoft Visual Studio
</code></pre>
  
  <p>9.0\VC\include\xstring(924): or       'std::basic_string&lt;_Elem,_Traits,_Ax>
  &amp;std::basic_string&lt;_Elem,_Traits,_Ax>::operator
  =(_Elem)'
          with
          [
              _Elem=wchar_t,
              _Traits=std::char_traits,
              _Ax=std::allocator
          ]
          while trying to match the argument list '(std::wstring, const
  std::string)'</p>

<pre><code>    C:\DevProjects\MyProjects\nttoolkit\trunk\external\tclap/Arg.h(446)
</code></pre>
  
  <p>: see reference to function template
  instantiation 'void
  TCLAP::SetString(T &amp;,const
  std::string &amp;)' being compiled
          with
          [
              T=std::wstring
          ]</p>

<pre><code>    C:\DevProjects\MyProjects\nttoolkit\trunk\external\tclap/ValueArg.h(391)
</code></pre>
  
  <p>: see reference to function template
  instantiation 'void
  TCLAP::ExtractValue(T &amp;,const
  std::string &amp;,TCLAP::StringLike)'
  being compiled
          with
          [
              T=std::wstring
          ]</p>

<pre><code>    C:\DevProjects\MyProjects\nttoolkit\trunk\external\tclap/ValueArg.h(389)
</code></pre>
  
  <p>: while compiling class template
  member function 'void
  TCLAP::ValueArg::_extractValue(const
  std::string &amp;)'
          with
          [
              T=std::wstring
          ]</p>

<pre><code>    C:\DevProjects\MyProjects\nttoolkit\trunk\external\tclap/ValueArg.h(325)
</code></pre>
  
  <p>: while compiling class template
  member function 'bool
  TCLAP::ValueArg::processArg(int
  *,std::vector&lt;_Ty> &amp;)'
          with
          [
              T=std::wstring,
              _Ty=std::string
          ]</p>

<pre><code>    C:\DevProjects\MyProjects\nttoolkit\trunk\external\tclap/UnlabeledValueArg.h(44)
</code></pre>
  
  <p>: see reference to class template</p>
  
  <p>instantiation 'TCLAP::ValueArg'
  being compiled
          with
          [
              T=std::wstring
          ]</p>

<pre><code>    C:\DevProjects\MyProjects\nttoolkit\trunk\tasksecure\src\main.cpp(26)
</code></pre>
  
  <p>: see reference to class template
  instantiation
  'TCLAP::UnlabeledValueArg' being
  compiled
          with
          [
              T=std::wstring
          ]</p>
  
  <p>TaskSecure - 1 error(s), 6 warning(s)</p>
</blockquote>
