add operator < for DEBUG
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8186 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4048f282c9
commit
3a45aa84d6
1 changed files with 7 additions and 2 deletions
|
|
@ -392,6 +392,11 @@ namespace swig
|
||||||
return _index - ri._index;
|
return _index - ri._index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool operator < (const self& ri) const
|
||||||
|
{
|
||||||
|
return _index < ri._index;
|
||||||
|
}
|
||||||
|
|
||||||
reference
|
reference
|
||||||
operator[](difference_type n) const
|
operator[](difference_type n) const
|
||||||
{
|
{
|
||||||
|
|
@ -531,14 +536,14 @@ namespace swig
|
||||||
const_iterator(swig::PySwigIterator *iter),
|
const_iterator(swig::PySwigIterator *iter),
|
||||||
const_reverse_iterator(swig::PySwigIterator *iter) {
|
const_reverse_iterator(swig::PySwigIterator *iter) {
|
||||||
if (SWIG_ConvertPtr($input, %as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0) != SWIG_OK) {
|
if (SWIG_ConvertPtr($input, %as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0) != SWIG_OK) {
|
||||||
%argument_fail(SWIG_TypeError, "$type", $argnum);
|
%argument_fail(SWIG_TypeError, "$type", $symname, $argnum);
|
||||||
}
|
}
|
||||||
if (iter) {
|
if (iter) {
|
||||||
swig::PySwigIterator_T<$type > *iter_t
|
swig::PySwigIterator_T<$type > *iter_t
|
||||||
= dynamic_cast<swig::PySwigIterator_T<$type > *>(iter);
|
= dynamic_cast<swig::PySwigIterator_T<$type > *>(iter);
|
||||||
$1 = iter_t->get_current();
|
$1 = iter_t->get_current();
|
||||||
} else {
|
} else {
|
||||||
%argument_fail(SWIG_TypeError, "$type", $argnum);
|
%argument_fail(SWIG_TypeError, "$type", $symname, $argnum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue