Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ctl::shared_ptr #1229

Closed
wants to merge 18 commits into from
Closed

Implement ctl::shared_ptr #1229

wants to merge 18 commits into from

Commits on Jun 18, 2024

  1. wip Implement ctl::shared_ptr

    This code does not segfault and it compiles cleanly, and it took a while
    to get here.
    mrdomino committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    b16cf2e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d8ee013 View commit details
    Browse the repository at this point in the history
  3. Try moving the unique_ptr into shared_pointer

    __::shared_pointer::make takes ownership of p the same way as shared_ptr
    does: either the allocation succeeds and the returned control block owns
    it, or the allocation throws and the unique_ptr frees it.
    
    Note that this construction is safe since C++17, in which the evaluation
    of constructor arguments is sequenced after a new-expression allocation.
    mrdomino committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    8794cdc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3b01802 View commit details
    Browse the repository at this point in the history
  5. further wip

    mrdomino committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    c719ded View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2024

  1. Configuration menu
    Copy the full SHA
    1fffa42 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2024

  1. Rename refcounting methods

    mrdomino committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    2edff8f View commit details
    Browse the repository at this point in the history
  2. Rename ctl -> rc

    ctl is overloaded...
    mrdomino committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    0b710a1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    da58178 View commit details
    Browse the repository at this point in the history
  4. Check for memory leaks

    mrdomino committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    79c0e97 View commit details
    Browse the repository at this point in the history
  5. clang-format

    mrdomino committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    df00ae1 View commit details
    Browse the repository at this point in the history
  6. wip deleter

    mrdomino committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    507ecaa View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2024

  1. Configuration menu
    Copy the full SHA
    a2555ed View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2024

  1. Configuration menu
    Copy the full SHA
    1758936 View commit details
    Browse the repository at this point in the history
  2. wip modernize/continue implementation

    - Adds is_void_v.
    
    - Uses enable_if to disable operator* and operator[] for void types.
    
    - Uses the new school C++-compatible atomic hack.
    
    - There is no implicit conversion from raw pointers to unique_ptr.
    
    Test compiles and passes now.
    mrdomino committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    9bea795 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2024

  1. Configuration menu
    Copy the full SHA
    f717889 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3c88e61 View commit details
    Browse the repository at this point in the history
  3. weak_ptr, conform more closely to the STL

    Just write out the constructor definitions on cppreference.com.
    
    Make the private constructor from a raw rc into a static private method
    instead of a private constructor.
    
    Various other minor fixes.
    mrdomino committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    b86808c View commit details
    Browse the repository at this point in the history