[mlpack-git] [mlpack/mlpack] Serialize a class with "map<int, Node*>" (#811)
kc420
notifications at github.com
Sun Nov 13 04:28:22 EST 2016
I wrote a class like this:
```
class Node
{
public:
//Node *root;
map<int, Node*> root;
template<typename Archive>
void Serialize(Archive &ar, unsigned int /**/)
{
ar & data::CreateNVP(root, "root");
}
};
class Pad
{
public:
Node *tree;
template<typename Archive>
void Serialize(Archive &ar, unsigned int /**/)
{
ar & data::CreateNVP(tree, "tree");
}
};
```
I found that I can't use a map contains a pointer like this(but it's okay if replaced by a "Node *")
Did I wrote something wrong or it's impossible to do that?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/811
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20161113/5749bd4b/attachment.html>
More information about the mlpack-git
mailing list