Fix issue on clang about implicit instantiation of undefined template
Generated code does not include <string>, which is referenced in templates. Clang may be incorrectly or aggresively instantiating some template. E.g., import_stl_b_wrap.cxx:3199:51: error: implicit instantiation of undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>
This commit is contained in:
parent
c3eff9234c
commit
213774e0b6
2 changed files with 14 additions and 2 deletions
|
|
@ -73,7 +73,13 @@ namespace std {
|
|||
#endif
|
||||
%}
|
||||
|
||||
%fragment("StdTraitsCommon","header") %{
|
||||
%fragment("StdStringInclude","header") %{
|
||||
#ifdef __clang__
|
||||
#include <string>
|
||||
#endif
|
||||
%}
|
||||
|
||||
%fragment("StdTraitsCommon","header",fragment="StdStringInclude") %{
|
||||
namespace swig {
|
||||
template <class Type>
|
||||
struct noconst_traits {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue