Last active
November 27, 2016 17:23
-
-
Save milan11/5380035 to your computer and use it in GitHub Desktop.
not nullable boost shared_ptr
Hello,
good in "theory" ; really not acceptable in practice (as for Today) ; implementing your ref-counted-facet would require:
- firstable, ensuring in a multi-threaded environnement the lifetime of refs ; ain't C++ work
- secondable, if 1 were to be true ; you would have to implement the mechanism for any existing container.
not that your approach and idea are silly ; because these sort of discussions have been brought on the table during TR1 six years ago!
-- "Within C++ is a smaller, simpler, safer language struggling to get out." Bjarne
-- "Let's get it out but slowly else you would break any compatibility" Me-self
Best.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh no, that's very, very broken. Why not to define your own
make_ref
function instead? (C++11 can do vararg templates!)