An open API service indexing awesome lists of open source software.

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

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
}
```