Opened 14 years ago

Closed 12 years ago

#1924 closed Feature Requests (wontfix)

sp_techniques clarity

Reported by: Dave Abrahams Owned by: Peter Dimov
Milestone: To Be Determined Component: smart_ptr
Version: Boost 1.35.0 Severity: Problem
Keywords: Cc:

Description

http://www.boost.org/doc/libs/1_35_0/libs/smart_ptr/sp_techniques.html#preventing_delete seems to suggest that the private deleter is what prevents "delete p.get()", but in fact it's the private dtor that does the trick. It's not entirely clear what you're trying to illustrate here but whatever it is, I think it could use a little more explanation.

Change History (4)

comment:1 by Dave Abrahams, 14 years ago

Summary: sp_techniques clariitysp_techniques clarity

comment:2 by Peter Dimov, 14 years ago

Milestone: Boost 1.36.0To Be Determined

comment:3 by Jonathan Wakely <jwakely.boost@…>, 13 years ago

If the deleter isn't also private then it doesn't solve the problem, as X::deleter()( p.get ); will still work.

The way I read it, that particular example is showing a technique using a private deleter. Yes, it relies on a private dtor, but the deleter and the fact it's private are the key points.

comment:4 by Peter Dimov, 12 years ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.