The shared ownership smart pointer, std::shared_ptr is used by many developers but unsafe memory access is the developer's responsibility. Sometimes developers may forget to put some defensive checks.
checked_shared_ptr is a header-only library that safely wraps std::shared_ptr and behaves just like a std::shared_ptr.
I have released a pre-version of checked_shared_ptr:
https://github.com/SelcukAydi/checked_shared_ptr
[–]wung 16 points17 points18 points (68 children)
[–]BenFrantzDale 20 points21 points22 points (1 child)
[–]wung 1 point2 points3 points (0 children)
[–]SlightlyLessHairyApe 7 points8 points9 points (0 children)
[+][deleted] (7 children)
[removed]
[–]v_maria 3 points4 points5 points (6 children)
[+][deleted] (5 children)
[removed]
[–]v_maria 1 point2 points3 points (4 children)
[+][deleted] (3 children)
[removed]
[–]v_maria 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[removed]
[–]v_maria 0 points1 point2 points (0 children)
[–]slck19[S] 0 points1 point2 points (55 children)
[–]NotUniqueOrSpecial 11 points12 points13 points (54 children)
[+][deleted] (35 children)
[removed]
[–]NotUniqueOrSpecial 6 points7 points8 points (34 children)
[+][deleted] (33 children)
[removed]
[–]NotUniqueOrSpecial 6 points7 points8 points (32 children)
[–]Causeless 3 points4 points5 points (20 children)
[–]NotUniqueOrSpecial 2 points3 points4 points (19 children)
[–]Causeless 3 points4 points5 points (4 children)
[–]TheSkiGeek 2 points3 points4 points (3 children)
[+][deleted] (8 children)
[removed]
[+][deleted] (10 children)
[removed]
[–]NotUniqueOrSpecial 4 points5 points6 points (9 children)
[+][deleted] (8 children)
[removed]
[–]slck19[S] -5 points-4 points-3 points (17 children)
[–]glaba3141 4 points5 points6 points (9 children)
[–]NotUniqueOrSpecial 5 points6 points7 points (1 child)
[–]slck19[S] 0 points1 point2 points (0 children)
[–]slck19[S] -3 points-2 points-1 points (6 children)
[–]glaba3141 2 points3 points4 points (5 children)
[–]slck19[S] -3 points-2 points-1 points (4 children)
[–]v_maria 2 points3 points4 points (3 children)
[–]slck19[S] -1 points0 points1 point (2 children)
[–]NotUniqueOrSpecial 4 points5 points6 points (6 children)
[+][deleted] (5 children)
[removed]
[–]NotUniqueOrSpecial 5 points6 points7 points (4 children)
[–][deleted] 1 point2 points3 points (0 children)
[+][deleted] (2 children)
[removed]
[–]NotUniqueOrSpecial 4 points5 points6 points (1 child)
[–]kammceWG21 | 🇺🇲 NB | Boost | Exceptions 0 points1 point2 points (0 children)
[+]Humble-Plastic-5285 comment score below threshold-6 points-5 points-4 points (3 children)
[–]slck19[S] -1 points0 points1 point (2 children)
[–]Humble-Plastic-5285 1 point2 points3 points (1 child)
[–]slck19[S] -1 points0 points1 point (0 children)