Seems like a reasonable idea, although not a slam dunk. I see #2 as
more important for adding to the enable_shared_from_this interface
because it can't be implemented outside of the interface, while
Nicol's "to_weak_ptr" satisfies your #1 and can be implemented outside
of the standard. We'll need a paper in order to actually make the
change, and I think you'd have a higher chance of acceptance if that
paper explores the actual performance impact in 2-3 widely-used
implementations of enable_shared_from_this. You should also try to
find some indication of how often this feature would be used in real
codebases and how performance-critical such uses are. Also see if
anyone (especially standard library maintainers) can think of other
ways to get a similar speedup without adding to the interface.
Re Nicol's "enable_shared_from_this doesn't *have* to wrap weak_ptr",
that's ok, since this feature is implementable even in libraries that
aren't implemented that way; it just might not give as much of a
speedup.
See
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/ for some
papers you can imitate, and "Paper submissions for the upcoming
mailing" on this mailing list for instructions on submitting a paper.
Jeffrey