https://github.com/eoan-ermine/deep_ptr
Deep pointers for C++14 and above
https://github.com/eoan-ermine/deep_ptr
cpp cpp14
Last synced: 12 months ago
JSON representation
Deep pointers for C++14 and above
- Host: GitHub
- URL: https://github.com/eoan-ermine/deep_ptr
- Owner: eoan-ermine
- License: mit
- Created: 2025-04-18T15:36:46.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-04-19T14:40:40.000Z (about 1 year ago)
- Last Synced: 2025-04-23T11:36:07.296Z (about 1 year ago)
- Topics: cpp, cpp14
- Language: CMake
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# deep_ptr
Deep pointers for C++14 and above
# Usage
```cpp
#include
#include
struct A {
struct B {
int p{5};
} b;
};
int main() {
A obj;
deep_ptr ptr{&A::b, &A::B::p};
int a = ptr.get(obj);
std::cout << a << '\n'; // Output: 5
}
```