You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... and this would be ill-formed when T is a reference type, function type, etc. std::unique_ptr<T> is also allowed for basically any T (including incomplete types such as void); you just need the right deleter to make it work.
I believe this could be solved editorially be using an Equivalent to specification instead of a Returns specification. Any opinions?
The text was updated successfully, but these errors were encountered:
... I would have seen it as a slight net positive, but the rules aren't as simple, and this is just more wording that needs to be kept in sync. I think it should be left as is; I don't see a way to improve it for std::make_unique at least.
std::make_unique<int&>
is not rejected by a Constraints or Mandates specification. Instead, it is said to returnunique_ptr<T>(new T(std::forward<Args>(args)...))
... and this would be ill-formed when
T
is a reference type, function type, etc.std::unique_ptr<T>
is also allowed for basically anyT
(including incomplete types such asvoid
); you just need the right deleter to make it work.I believe this could be solved editorially be using an Equivalent to specification instead of a Returns specification. Any opinions?
The text was updated successfully, but these errors were encountered: