Added quickstart page
This commit is contained in:
@@ -60,9 +60,10 @@ namespace cereal
|
||||
return new MyType( x );
|
||||
}
|
||||
};
|
||||
``
|
||||
```
|
||||
|
||||
---
|
||||
`
|
||||
|
||||
### Implementation notes
|
||||
|
||||
When saving an `std::shared_ptr`, we first check to make sure we haven't serialized it before. This is done by keeping a map from addresses to pointer ids (an `std::uint32_t`), which are unique. Pointers that are newly serialized are given a new id with the most significant bit set to `1`. When saved, an `std::shared_ptr` will first output its id, which will either have its MSB set to `1` if it is the first instance of that id, or will be an id already in the archive. This is immediately followed by the data found by dereferencing the pointer. If the pointer was equal to `nullptr`, its id is set to `0` and nothing else is saved.
|
||||
|
||||
Reference in New Issue
Block a user