Pair checkpointing fix (#1356)

* Fix pair checkpointing bug, add tests
* Documentation update
This commit is contained in:
Jacqueline Deans
2022-10-07 17:00:09 -05:00
committed by GitHub
parent 3d2e8e52ca
commit 2519c914a5
7 changed files with 106 additions and 93 deletions

View File

@ -46,7 +46,7 @@ If it is in a class that is nested in a `sim_object`, it will be registered with
You can nest an arbitrary amount of STLs, they will all be checkpointed as long as
the base is a member of a class that is registered with the memory manager. There
are a some [**limitations**](#limitations) and exceptions due to [**bugs**](#known_bugs) at the moment (but hopefully not forever!)
are a some known [**limitations**](#limitations).
```
class AnyClass {
@ -109,14 +109,5 @@ memorymanager->declare_var_extern(&my_vector, "std::vector<int> my_vector_alloca
```
<a id=known-bugs></a>
## Known bugs
The types in an std::pair cannot be sequence STL types (vector, queue, stack, etc).
```
// This will fail to checkpoint
std::pair<int, std::vector<int>>
```
[Continue to Threads](Threads)