Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upctypes::void still isn't correct #1907
Comments
ghost
assigned
lht
Mar 8, 2012
graydon
closed this
in
ab4105d
Apr 5, 2012
brson
unassigned
lht
Jun 16, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
brson commentedFeb 26, 2012
This type is intended to only be used as an opaque type for unsafe pointers to point to. It is defined in a way that isn't constructable or destructurable, but it is still a copyable type. That means that you can define
type complicated_c_struct = ctypes::voidwith the intent of using it only as an unsafe pointer, but could potentially writelet newcopy = *complicated_c_struct_pointerand create a big mess.We could put a resource field inside it to prevent this.