Commit da1258e2e679bc8b9471b5d9ff35d8473e76e062

Authored by Jay Berkenbilt
1 parent 8a87a2fb

Update C++11 notes in TODO

Showing 1 changed file with 16 additions and 20 deletions
... ... @@ -34,32 +34,28 @@ Comments appear in the code prefixed by "ABI"
34 34 C++-11
35 35 ======
36 36  
37   -* My c++11 branch adds re-implements PointerHolder so that it is
38   - interchangeable with std::shared_ptr. It is not actually possible to
39   - just replace PointerHolder with std::shared_ptr for two reasons:
40   - there is no automatic creation of std::shared_ptr<T> from T* like
41   - there is for PointerHolder, which breaks some code, and also there
42   - is no automatic conversion from something like
43   - std::vector<PointerHolder<T>> to std::vector<std::shared_ptr<T>>. It
44   - may be a good idea to replace PointerHolder with std::shared_ptr in
45   - the API even if it requires some work for the developer, but even if
46   - that isn't worth it, we should find all occurrences of PointerHolder
47   - within the code and replace with std::shared_ptr or std::unique_ptr
48   - as needed. This will definitely break binary compatibility as the
49   - PointerHolder<Members> pattern is part of the ABI for almost every
50   - class.
51   -
52   -* QIntC.hh could be simplified with type_traits.
53   -
54 37 * Search for ::iterator and ::const_iterator and replace with either
55 38 auto or foreach-style iteration.
56 39  
57 40 * There may be some places where std::function and lambdas can
58 41 simplify handlers rather than using classes with apply methods.
59 42  
60   -* Find places where we declare but don't define copy and assignment
61   - and replace with deleted methods to move errors from link to compile
62   - time.
  43 +* My c++11 branch adds re-implements PointerHolder so that it is
  44 + interchangeable with std::shared_ptr. We may not actually want to
  45 + ever do this because it turns out PointerHolder is slightly more
  46 + performant than std::shared_ptr, at least as of g++ 9.2.1. It is not
  47 + actually possible to just replace PointerHolder with std::shared_ptr
  48 + for two reasons: there is no automatic creation of
  49 + std::shared_ptr<T> from T* like there is for PointerHolder, which
  50 + breaks some code, and also there is no automatic conversion from
  51 + something like std::vector<PointerHolder<T>> to
  52 + std::vector<std::shared_ptr<T>>. It may be a good idea to replace
  53 + PointerHolder with std::shared_ptr in the API even if it requires
  54 + some work for the developer, but even if that isn't worth it, we
  55 + should find all occurrences of PointerHolder within the code and
  56 + replace with std::shared_ptr or std::unique_ptr as needed. This will
  57 + definitely break binary compatibility as the PointerHolder<Members>
  58 + pattern is part of the ABI for almost every class.
63 59  
64 60  
65 61 Page splitting/merging
... ...