STL fixes when using %import rather than %include and the Solaris Workshop compiler
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10424 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b0ecf14e31
commit
da8791792b
9 changed files with 18 additions and 47 deletions
|
|
@ -1004,15 +1004,12 @@ namespace swig {
|
|||
template <class RubySeq, class Seq>
|
||||
inline void
|
||||
assign(const RubySeq& rubyseq, Seq* seq) {
|
||||
%#ifdef SWIG_STD_NOASSIGN_STL
|
||||
// seq->assign(rubyseq.begin(), rubyseq.end()); // not used as not always implemented
|
||||
typedef typename RubySeq::value_type value_type;
|
||||
typename RubySeq::const_iterator it = rubyseq.begin();
|
||||
for (;it != rubyseq.end(); ++it) {
|
||||
seq->insert(seq->end(),(value_type)(*it));
|
||||
}
|
||||
%#else
|
||||
seq->assign(rubyseq.begin(), rubyseq.end());
|
||||
%#endif
|
||||
}
|
||||
|
||||
template <class Seq, class T = typename Seq::value_type >
|
||||
|
|
|
|||
|
|
@ -10,15 +10,12 @@
|
|||
template <class RubySeq, class T>
|
||||
inline void
|
||||
assign(const RubySeq& rubyseq, std::multiset<T>* seq) {
|
||||
#ifdef SWIG_STD_NOINSERT_TEMPLATE_STL
|
||||
// seq->insert(rubyseq.begin(), rubyseq.end()); // not used as not always implemented
|
||||
typedef typename RubySeq::value_type value_type;
|
||||
typename RubySeq::const_iterator it = rubyseq.begin();
|
||||
for (;it != rubyseq.end(); ++it) {
|
||||
seq->insert(seq->end(),(value_type)(*it));
|
||||
}
|
||||
#else
|
||||
seq->insert(rubyseq.begin(), rubyseq.end());
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
|
|
|||
|
|
@ -8,15 +8,12 @@
|
|||
template <class RubySeq, class T>
|
||||
inline void
|
||||
assign(const RubySeq& rubyseq, std::set<T>* seq) {
|
||||
#ifdef SWIG_STD_NOINSERT_TEMPLATE_STL
|
||||
// seq->insert(rubyseq.begin(), rubyseq.end()); // not used as not always implemented
|
||||
typedef typename RubySeq::value_type value_type;
|
||||
typename RubySeq::const_iterator it = rubyseq.begin();
|
||||
for (;it != rubyseq.end(); ++it) {
|
||||
seq->insert(seq->end(),(value_type)(*it));
|
||||
}
|
||||
#else
|
||||
seq->insert(rubyseq.begin(), rubyseq.end());
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue