Commit 08dcfd70 authored by Kevin R. Thornton's avatar Kevin R. Thornton

(crude) addition of std::allocator<T>

parent 895da799
...@@ -4,6 +4,20 @@ cdef extern from "<memory>" namespace "std" nogil: ...@@ -4,6 +4,20 @@ cdef extern from "<memory>" namespace "std" nogil:
cdef cppclass default_delete[T]: cdef cppclass default_delete[T]:
default_delete() default_delete()
cdef cppclass allocator[T]:
allocator()
allocator(const allocator &)
allocator[U](const allocator[U] &)
T * address(T &)
const T * address(const T &) const
T * allocate( size_t n ) # Not to standard. should be a second default argument
void deallocate(T * , size_t)
size_t max_size() const
void construct( T *, const T &) #C++98. The C++11 version is variadic AND perfect-forwarding
void destroy(T *) #C++98
void destroy[U](U *)
cdef cppclass unique_ptr[T,DELETER=*]: cdef cppclass unique_ptr[T,DELETER=*]:
unique_ptr() unique_ptr()
unique_ptr(nullptr_t) unique_ptr(nullptr_t)
......
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