Commit 6cdd24b0 authored by Lisandro Dalcin's avatar Lisandro Dalcin

fixes and enhancements in libcpp

parent f3e94744
...@@ -12,8 +12,8 @@ cdef extern from "<deque>" namespace "std": ...@@ -12,8 +12,8 @@ cdef extern from "<deque>" namespace "std":
T& operator*() T& operator*()
iterator operator++() iterator operator++()
iterator operator--() iterator operator--()
bint operator==(iterator) bint operator==(reverse_iterator)
bint operator!=(iterator) bint operator!=(reverse_iterator)
#cppclass const_iterator(iterator): #cppclass const_iterator(iterator):
# pass # pass
#cppclass const_reverse_iterator(reverse_iterator): #cppclass const_reverse_iterator(reverse_iterator):
......
...@@ -10,8 +10,8 @@ cdef extern from "<list>" namespace "std": ...@@ -10,8 +10,8 @@ cdef extern from "<list>" namespace "std":
T& operator*() T& operator*()
iterator operator++() iterator operator++()
iterator operator--() iterator operator--()
bint operator==(iterator) bint operator==(reverse_iterator)
bint operator!=(iterator) bint operator!=(reverse_iterator)
#cppclass const_iterator(iterator): #cppclass const_iterator(iterator):
# pass # pass
#cppclass const_reverse_iterator(reverse_iterator): #cppclass const_reverse_iterator(reverse_iterator):
...@@ -30,6 +30,7 @@ cdef extern from "<list>" namespace "std": ...@@ -30,6 +30,7 @@ cdef extern from "<list>" namespace "std":
T& back() T& back()
iterator begin() iterator begin()
#const_iterator begin() #const_iterator begin()
void clear()
bint empty() bint empty()
iterator end() iterator end()
#const_iterator end() #const_iterator end()
......
from pair cimport pair from utility cimport pair
cdef extern from "<map>" namespace "std": cdef extern from "<map>" namespace "std":
cdef cppclass map[T, U]: cdef cppclass map[T, U]:
...@@ -9,11 +9,11 @@ cdef extern from "<map>" namespace "std": ...@@ -9,11 +9,11 @@ cdef extern from "<map>" namespace "std":
bint operator==(iterator) bint operator==(iterator)
bint operator!=(iterator) bint operator!=(iterator)
cppclass reverse_iterator: cppclass reverse_iterator:
pair[T,U] operator*() pair[T,U]& operator*()
iterator operator++() iterator operator++()
iterator operator--() iterator operator--()
bint operator==(iterator) bint operator==(reverse_iterator)
bint operator!=(iterator) bint operator!=(reverse_iterator)
#cppclass const_iterator(iterator): #cppclass const_iterator(iterator):
# pass # pass
#cppclass const_reverse_iterator(reverse_iterator): #cppclass const_reverse_iterator(reverse_iterator):
......
cdef extern from "<utility>" namespace "std": from utility cimport pair
cdef cppclass pair[T, U]:
T first
U second
pair()
pair(pair&)
pair(T&, U&)
...@@ -3,17 +3,17 @@ from pair cimport pair ...@@ -3,17 +3,17 @@ from pair cimport pair
cdef extern from "<set>" namespace "std": cdef extern from "<set>" namespace "std":
cdef cppclass set[T]: cdef cppclass set[T]:
cppclass iterator: cppclass iterator:
T operator*() T& operator*()
iterator operator++() iterator operator++()
iterator operator--() iterator operator--()
bint operator==(iterator) bint operator==(iterator)
bint operator!=(iterator) bint operator!=(iterator)
cppclass reverse_iterator: cppclass reverse_iterator:
T operator*() T& operator*()
iterator operator++() iterator operator++()
iterator operator--() iterator operator--()
bint operator==(iterator) bint operator==(reverse_iterator)
bint operator!=(iterator) bint operator!=(reverse_iterator)
#cppclass const_iterator(iterator): #cppclass const_iterator(iterator):
# pass # pass
#cppclass const_reverse_iterator(reverse_iterator): #cppclass const_reverse_iterator(reverse_iterator):
......
cdef extern from "<utility>" namespace "std":
cdef cppclass pair[T, U]:
T first
U second
pair()
pair(pair&)
pair(T&, U&)
bint operator==(pair&, pair&)
bint operator!=(pair&, pair&)
bint operator<(pair&, pair&)
bint operator>(pair&, pair&)
bint operator<=(pair&, pair&)
bint operator>=(pair&, pair&)
...@@ -6,8 +6,8 @@ cdef extern from "<vector>" namespace "std": ...@@ -6,8 +6,8 @@ cdef extern from "<vector>" namespace "std":
iterator operator--() iterator operator--()
bint operator==(iterator) bint operator==(iterator)
bint operator!=(iterator) bint operator!=(iterator)
bint operator< (iterator) bint operator<(iterator)
bint operator> (iterator) bint operator>(iterator)
bint operator<=(iterator) bint operator<=(iterator)
bint operator>=(iterator) bint operator>=(iterator)
cppclass reverse_iterator: cppclass reverse_iterator:
...@@ -16,8 +16,8 @@ cdef extern from "<vector>" namespace "std": ...@@ -16,8 +16,8 @@ cdef extern from "<vector>" namespace "std":
iterator operator--() iterator operator--()
bint operator==(reverse_iterator) bint operator==(reverse_iterator)
bint operator!=(reverse_iterator) bint operator!=(reverse_iterator)
bint operator< (reverse_iterator) bint operator<(reverse_iterator)
bint operator> (reverse_iterator) bint operator>(reverse_iterator)
bint operator<=(reverse_iterator) bint operator<=(reverse_iterator)
bint operator>=(reverse_iterator) bint operator>=(reverse_iterator)
#cppclass const_iterator(iterator): #cppclass const_iterator(iterator):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment