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

"T* p" vs. "T *p" #118

Closed
jwakely opened this issue May 12, 2013 · 3 comments
Closed

"T* p" vs. "T *p" #118

jwakely opened this issue May 12, 2013 · 3 comments

Comments

@jwakely
Copy link
Member

jwakely commented May 12, 2013

The library is inconsistent about the placement of the ptr-operator, sometimes even within the same class, e.g. [util.smartptr.shared] has

template<class Y> explicit shared_ptr(Y* p);
template<class Y, class D> shared_ptr(Y* p, D d);
[...]
template<class Y> shared_ptr(const shared_ptr<Y>& r, T *p) noexcept;

It would be better to be consistent. A couple of quick searches indicate the more common placement is on the left with the type (which is the correct style IMHO ;-)

@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 5, 2015

Agreed, and I think we're getting better at this.

Do you have a query that let's us track whether this issue is complete?

@oblitum
Copy link

oblitum commented Dec 5, 2015

If any of this start to be adopted, I hope at last it doesn't slip into the language core, as @zygoloid suggested.

@jensmaurer
Copy link
Member

Issue #166 claims this was fixed for pointer declarators. At least the particular example shown above is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants