title: stl_algobase.h error when including string
body: <p>In a recently created project I have this error when trying to <code>make</code>:</p>
  
  <p>Note: <code>params.h:11</code> is just <code>#include &lt;string&gt;</code></p>
  
  <pre><code>Building file: ../src/cmds/params.cpp
  Invoking: Cross G++ Compiler
  g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/cmds/params.d" -MT"src/cmds/params.d" -o "src/cmds/params.o" "../src/cmds/params.cpp"
  In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0,
                   from /usr/include/c++/4.8/string:40,
                   from ../src/cmds/params.h:11,
                   from ../src/cmds/params.cpp:8:
  /usr/include/c++/4.8/bits/stl_algobase.h: In instantiation of ‘static _OI std::__copy_move&lt;false, false, std::random_access_iterator_tag&gt;::__copy_m(_II, _II, _OI) [with _II = char*; _OI = std::ostream_iterator&lt;std::basic_string&lt;char&gt; &gt;]’:
  /usr/include/c++/4.8/bits/stl_algobase.h:390:70:   required from ‘_OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = char*; _OI = std::ostream_iterator&lt;std::basic_string&lt;char&gt; &gt;]’
  /usr/include/c++/4.8/bits/stl_algobase.h:428:38:   required from ‘_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = __gnu_cxx::__normal_iterator&lt;char*, std::basic_string&lt;char&gt; &gt;; _OI = std::ostream_iterator&lt;std::basic_string&lt;char&gt; &gt;]’
  /usr/include/c++/4.8/bits/stl_algobase.h:460:17:   required from ‘_OI std::copy(_II, _II, _OI) [with _II = __gnu_cxx::__normal_iterator&lt;char*, std::basic_string&lt;char&gt; &gt;; _OI = std::ostream_iterator&lt;std::basic_string&lt;char&gt; &gt;]’
  ../src/cmds/params.cpp:96:81:   required from here
  /usr/include/c++/4.8/bits/stl_algobase.h:335:18: error: invalid user-defined conversion from ‘char’ to ‘const std::basic_string&lt;char&gt;&amp;’ [-fpermissive]
          *__result = *__first;
                    ^
  In file included from /usr/include/c++/4.8/string:53:0,
                   from ../src/cmds/params.h:11,
                   from ../src/cmds/params.cpp:8:
  /usr/include/c++/4.8/bits/basic_string.tcc:212:5: note: candidate is: std::basic_string&lt;_CharT, _Traits, _Alloc&gt;::basic_string(const _CharT*, const _Alloc&amp;) [with _CharT = char; _Traits = std::char_traits&lt;char&gt;; _Alloc = std::allocator&lt;char&gt;] &lt;near match&gt;
       basic_string&lt;_CharT, _Traits, _Alloc&gt;::
       ^
  /usr/include/c++/4.8/bits/basic_string.tcc:212:5: note:   no known conversion for argument 1 from ‘char’ to ‘const char*’
  In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0,
                   from /usr/include/c++/4.8/string:40,
                   from ../src/cmds/params.h:11,
                   from ../src/cmds/params.cpp:8:
  /usr/include/c++/4.8/bits/stl_algobase.h:335:18: error: invalid conversion from ‘char’ to ‘const char*’ [-fpermissive]
          *__result = *__first;
                    ^
  In file included from /usr/include/c++/4.8/string:53:0,
                   from ../src/cmds/params.h:11,
                   from ../src/cmds/params.cpp:8:
  /usr/include/c++/4.8/bits/basic_string.tcc:212:5: error:   initializing argument 1 of ‘std::basic_string&lt;_CharT, _Traits, _Alloc&gt;::basic_string(const _CharT*, const _Alloc&amp;) [with _CharT = char; _Traits = std::char_traits&lt;char&gt;; _Alloc = std::allocator&lt;char&gt;]’ [-fpermissive]
       basic_string&lt;_CharT, _Traits, _Alloc&gt;::
       ^
  make: *** [src/cmds/params.o] Error 1
  </code></pre>
  
  <p>What could be the cause?</p>