shared_ref is a non-nullable, reference-counted reference wrapper.
Table of Contents
shared_ref can used similarly to shared_ptr, however, it cannot inherit existing pointers.
#include <shared_ref.hpp>
#include <iostream>
int main(void)
{
auto value = ref::make_shared<int>(1);
auto copy(value);
std::cout << "Value is: " << value.get() << std::endl;
}All useful pull requests will be merged, provided that they do not add external dependencies and follow these guidelines.
- Preprocessor macros should be used sparingly.
- Code syntax should not depend on the preprocessor.
- Your code must be readable.
MIT, see license.