Menu

#780 std_string and std_sstream.i bug

open
nobody
None
5
2023-05-29
2006-12-02
No

the following (very) simple interface:

%include std_string.i
%include std_sstream.i

produce invalid c++ code, where basic_string is not prefixed with "std::".
Including the 2 libs in reversed order works without any problem:

%include std_sstream.i
%include std_string.i

Reproduced on mac os and linux, with python and swig 1.3.31

Discussion

  • Olly Betts

    Olly Betts - 2012-05-18

    Still occurs for current SVN trunk, with both python and ruby.

     
  • Olly Betts

    Olly Betts - 2022-02-16

    Still present in git master for python.

    With -ruby I now get an error for the first case:

    swig/Lib/ruby/std_basic_string.i:55: Error: Unknown directive '%traits_swigtype'.

    The second case doesn't give a SWIG error and uses std::basic_string everywhere.

     
  • Olly Betts

    Olly Betts - 2023-05-29
     

Log in to post a comment.