Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

23
  • 5
    "never" is in the same league as "always": I don't like absolute statements in contexts like these, they do more damage than good. Not my downvote though, you already got your share. ;-) Commented Feb 23, 2016 at 15:14
  • 3
    "...except where necessary for downward compatibility". ;-) "Never invoke UB" is better. ;-) Commented Feb 23, 2016 at 15:17
  • 2
    @SergeyA I want shared pointer which points to memory shared by several processes and destroys object when all processes stop using this object. IS there any already implemented smart pointer? What to do with library implementers? Function I posted was just an example. There are many more (usually to get some system info) Commented Feb 23, 2016 at 15:22
  • 3
    @SergeyA All your "never"'s only apply to low-skilled programmers, who find it easier to learn a thousand of "never"-rules instead of learning how C++ works. Not all C++ programmers are that silly. Commented Feb 23, 2016 at 15:23
  • 2
    @SergeyA: std::shared_ptr for inter-process shared memory? And yes, I agree a library implementor shouldn't ask such a question. But why should anybody first learn absolute rules, always do this, never do that, then have to unlearn them again as he becomes more skillful (casting doubt on his tutors in the process)? I think even beginners can handle a "don't, unless you really know what you're doing". Commented Feb 23, 2016 at 15:29