Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
411668ee
Commit
411668ee
authored
Jul 02, 2015
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experimental smart pointer support.
parent
74435af4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
88 additions
and
0 deletions
+88
-0
Cython/Includes/libcpp/memory.pxd
Cython/Includes/libcpp/memory.pxd
+88
-0
No files found.
Cython/Includes/libcpp/memory.pxd
0 → 100644
View file @
411668ee
from
libcpp
cimport
bool
cdef
extern
from
"<memory>"
namespace
"std"
nogil
:
ctypedef
void
*
nullptr_t
;
# Should be decltype(nullptr)
cdef
cppclass
unique_ptr
[
T
]:
unique_ptr
()
unique_ptr
(
nullptr_t
)
unique_ptr
(
T
*
)
unique_ptr
(
unique_ptr
[
T
]
&
)
# Modifiers
T
*
release
()
void
reset
()
void
reset
(
nullptr_t
)
void
reset
(
T
*
)
void
swap
(
unique_ptr
&
)
# Observers
T
*
get
()
T
&
operator
*
()
#T* operator->() # 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
==
(
nullptr_t
)
bool
operator
!=
(
nullptr_t
)
# Forward Declaration not working ("Compiler crash in AnalyseDeclarationsTransform")
#cdef cppclass weak_ptr[T]
cdef
cppclass
shared_ptr
[
T
]:
shared_ptr
()
shared_ptr
(
nullptr_t
)
shared_ptr
(
T
*
)
shared_ptr
(
shared_ptr
[
T
]
&
)
shared_ptr
(
shared_ptr
[
T
]
&
,
T
*
)
shared_ptr
(
unique_ptr
[
T
]
&
)
#shared_ptr(weak_ptr[T]&) # Not Supported
# Modifiers
void
reset
()
void
reset
(
T
*
)
void
swap
(
shared_ptr
&
)
# Observers
T
*
get
()
T
&
operator
*
()
#T* operator->() # Not Supported
long
use_count
()
bool
unique
()
#bool operator bool() # Not Supported
#bool owner_before[Y](const weak_ptr[Y]&) # Not Supported
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
==
(
nullptr_t
)
bool
operator
!=
(
nullptr_t
)
cdef
cppclass
weak_ptr
[
T
]:
weak_ptr
()
weak_ptr
(
weak_ptr
[
T
]
&
)
weak_ptr
(
shared_ptr
[
T
]
&
)
# Modifiers
void
reset
()
void
swap
(
weak_ptr
&
)
# Observers
long
use_count
()
bool
expired
()
shared_ptr
[
T
]
lock
()
bool
owner_before
[
Y
](
const
weak_ptr
[
Y
]
&
)
bool
owner_before
[
Y
](
const
shared_ptr
[
Y
]
&
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment