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
|
|
@ -685,15 +685,12 @@ namespace swig {
|
|||
template <class PySeq, class Seq>
|
||||
inline void
|
||||
assign(const PySeq& pyseq, Seq* seq) {
|
||||
%#ifdef SWIG_STD_NOASSIGN_STL
|
||||
// seq->assign(pyseq.begin(), pyseq.end()); // not used as not always implemented
|
||||
typedef typename PySeq::value_type value_type;
|
||||
typename PySeq::const_iterator it = pyseq.begin();
|
||||
for (;it != pyseq.end(); ++it) {
|
||||
seq->insert(seq->end(),(value_type)(*it));
|
||||
}
|
||||
%#else
|
||||
seq->assign(pyseq.begin(), pyseq.end());
|
||||
%#endif
|
||||
}
|
||||
|
||||
template <class Seq, class T = typename Seq::value_type >
|
||||
|
|
|
|||
|
|
@ -10,15 +10,12 @@
|
|||
template <class PySeq, class T>
|
||||
inline void
|
||||
assign(const PySeq& pyseq, std::multiset<T>* seq) {
|
||||
#ifdef SWIG_STD_NOINSERT_TEMPLATE_STL
|
||||
// seq->insert(pyseq.begin(), pyseq.end()); // not used as not always implemented
|
||||
typedef typename PySeq::value_type value_type;
|
||||
typename PySeq::const_iterator it = pyseq.begin();
|
||||
for (;it != pyseq.end(); ++it) {
|
||||
seq->insert(seq->end(),(value_type)(*it));
|
||||
}
|
||||
#else
|
||||
seq->insert(pyseq.begin(), pyseq.end());
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
|
|
|||
|
|
@ -8,15 +8,12 @@
|
|||
template <class PySeq, class T>
|
||||
inline void
|
||||
assign(const PySeq& pyseq, std::set<T>* seq) {
|
||||
#ifdef SWIG_STD_NOINSERT_TEMPLATE_STL
|
||||
// seq->insert(pyseq.begin(), pyseq.end()); // not used as not always implemented
|
||||
typedef typename PySeq::value_type value_type;
|
||||
typename PySeq::const_iterator it = pyseq.begin();
|
||||
for (;it != pyseq.end(); ++it) {
|
||||
seq->insert(seq->end(),(value_type)(*it));
|
||||
}
|
||||
#else
|
||||
seq->insert(pyseq.begin(), pyseq.end());
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue