Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add uncheckedptr<T> type constructor #8

Open
dtarditi opened this issue Apr 12, 2016 · 2 comments
Open

add uncheckedptr<T> type constructor #8

dtarditi opened this issue Apr 12, 2016 · 2 comments

Comments

@dtarditi
Copy link
Contributor

Greg Morrisett suggested that we add an unsafe_ptr constructor that is an abbreviation for T *. I think this is a good idea because it will allow code to be parameterized by the kind of pointer. This will be useful in C when using macros and likely useful when extending Checked C to C++.

@gdr-at-ms
Copy link
Member

There are lot of T*s in C; I would think unsafeptr<T> is a bit too broad, IMHO.

In the C++ core guidelines we added owner<T> as alias for T* to indicate a specific set of problematic situation.

@dtarditi
Copy link
Contributor Author

We discussed this and decided that unchecked_ptr would be a better name. Gabby was somewhat concerned about unsafe_ptr because there are several sources of unsafety, and currently we are addressing only one of them.

We like the idea, but do have some concerns about how it might interact with other uses of type constructors to denote properties in C++. We are going to wait to add this until we have some motivating examples gathered from experience using or applying Checked C.

@dtarditi dtarditi added this to the Unscheduled work milestone May 23, 2016
@dtarditi dtarditi changed the title add unsafeptr<T> type constructor add uncheckedptr<T> type constructor Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants