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

Add example #5

Closed
wants to merge 4 commits into from
Closed

Add example #5

wants to merge 4 commits into from

Conversation

henrygerardmoore
Copy link
Collaborator

@henrygerardmoore henrygerardmoore commented Nov 16, 2023

Currently, this example doesn't work and I'm not sure why. I was trying to make an example to show how to make an automatically managed shared ptr so that one could add logging to their application more easily. With this, the type is just std::shared_ptr<T> rather than std::shared_ptr<DataTamer::LoggedValue<T>> for a type T. Not sure this is necessary/useful, but I also figured it would be helpful for learning how to use DataTamer while making this example.

This builds and runs without error but doesn't log as I would expect. Maybe a better name than raii would be log_shared_ptr or something.

Copy link

codecov bot commented Nov 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2cd0d31) 65.15% compared to head (76e804d) 65.19%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main       #5      +/-   ##
==========================================
+ Coverage   65.15%   65.19%   +0.04%     
==========================================
  Files          12       12              
  Lines         861      862       +1     
==========================================
+ Hits          561      562       +1     
  Misses        300      300              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@henrygerardmoore
Copy link
Collaborator Author

After some discussion, will be closing this as the functionality doesn't really add anything. The logging wouldn't be thread-safe in this case, so kind of defeats the purpose of having a shared pointer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant