Commit cc56f17c authored by Robert Bradshaw's avatar Robert Bradshaw

Add nullptr to libcpp declarations.

parent 2e32985e
cdef extern from *: cdef extern from *:
ctypedef bint bool ctypedef bint bool
ctypedef void* nullptr_t
nullptr_t nullptr
from libcpp cimport bool from libcpp cimport bool, nullptr_t, nullptr
cdef extern from "<memory>" namespace "std" nogil: cdef extern from "<memory>" namespace "std" nogil:
ctypedef void* nullptr_t; # Should be decltype(nullptr)
cdef cppclass unique_ptr[T]: cdef cppclass unique_ptr[T]:
unique_ptr() unique_ptr()
unique_ptr(nullptr_t) unique_ptr(nullptr_t)
unique_ptr(T*) unique_ptr(T*)
unique_ptr(unique_ptr[T]&) unique_ptr(unique_ptr[T]&)
# Modifiers # Modifiers
T* release() T* release()
void reset() void reset()
void reset(nullptr_t) void reset(nullptr_t)
void reset(T*) void reset(T*)
void swap(unique_ptr&) void swap(unique_ptr&)
# Observers # Observers
T* get() T* get()
T& operator*() T& operator*()
#T* operator->() # Not Supported #T* operator->() # Not Supported
#bool operator bool() # Not Supported #bool operator bool() # Not Supported
bool operator==(const unique_ptr&) bool operator==(const unique_ptr&)
bool operator!=(const unique_ptr&) bool operator!=(const unique_ptr&)
bool operator<(const unique_ptr&) bool operator<(const unique_ptr&)
bool operator>(const unique_ptr&) bool operator>(const unique_ptr&)
bool operator<=(const unique_ptr&) bool operator<=(const unique_ptr&)
bool operator>=(const unique_ptr&) bool operator>=(const unique_ptr&)
bool operator==(nullptr_t) bool operator==(nullptr_t)
bool operator!=(nullptr_t) bool operator!=(nullptr_t)
# Forward Declaration not working ("Compiler crash in AnalyseDeclarationsTransform") # Forward Declaration not working ("Compiler crash in AnalyseDeclarationsTransform")
#cdef cppclass weak_ptr[T] #cdef cppclass weak_ptr[T]
cdef cppclass shared_ptr[T]: cdef cppclass shared_ptr[T]:
shared_ptr() shared_ptr()
shared_ptr(nullptr_t) shared_ptr(nullptr_t)
...@@ -43,12 +42,12 @@ cdef extern from "<memory>" namespace "std" nogil: ...@@ -43,12 +42,12 @@ cdef extern from "<memory>" namespace "std" nogil:
shared_ptr(shared_ptr[T]&, T*) shared_ptr(shared_ptr[T]&, T*)
shared_ptr(unique_ptr[T]&) shared_ptr(unique_ptr[T]&)
#shared_ptr(weak_ptr[T]&) # Not Supported #shared_ptr(weak_ptr[T]&) # Not Supported
# Modifiers # Modifiers
void reset() void reset()
void reset(T*) void reset(T*)
void swap(shared_ptr&) void swap(shared_ptr&)
# Observers # Observers
T* get() T* get()
T& operator*() T& operator*()
...@@ -58,26 +57,26 @@ cdef extern from "<memory>" namespace "std" nogil: ...@@ -58,26 +57,26 @@ cdef extern from "<memory>" namespace "std" nogil:
#bool operator bool() # Not Supported #bool operator bool() # Not Supported
#bool owner_before[Y](const weak_ptr[Y]&) # Not Supported #bool owner_before[Y](const weak_ptr[Y]&) # Not Supported
bool owner_before[Y](const shared_ptr[Y]&) bool owner_before[Y](const shared_ptr[Y]&)
bool operator==(const shared_ptr&) bool operator==(const shared_ptr&)
bool operator!=(const shared_ptr&) bool operator!=(const shared_ptr&)
bool operator<(const shared_ptr&) bool operator<(const shared_ptr&)
bool operator>(const shared_ptr&) bool operator>(const shared_ptr&)
bool operator<=(const shared_ptr&) bool operator<=(const shared_ptr&)
bool operator>=(const shared_ptr&) bool operator>=(const shared_ptr&)
bool operator==(nullptr_t) bool operator==(nullptr_t)
bool operator!=(nullptr_t) bool operator!=(nullptr_t)
cdef cppclass weak_ptr[T]: cdef cppclass weak_ptr[T]:
weak_ptr() weak_ptr()
weak_ptr(weak_ptr[T]&) weak_ptr(weak_ptr[T]&)
weak_ptr(shared_ptr[T]&) weak_ptr(shared_ptr[T]&)
# Modifiers # Modifiers
void reset() void reset()
void swap(weak_ptr&) void swap(weak_ptr&)
# Observers # Observers
long use_count() long use_count()
bool expired() bool expired()
......
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