-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtestvmap.cc
More file actions
43 lines (35 loc) · 943 Bytes
/
Copy pathtestvmap.cc
File metadata and controls
43 lines (35 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
@copyright Russell Standish 2000-2013
@author Russell Standish
This file is part of Classdesc
Open source licensed under the MIT license. See LICENSE for details.
*/
/*
test that adding new vmap entries does not stuff up ptrlists
*/
#define MAP vmap
#include "../graphcode.h"
using namespace GRAPHCODE_NS;
class myobject: public classdesc::Object<myobject, GRAPHCODE_NS::object>
{
};
// we're not actually using serialisation here...
namespace classdesc_access
{
template <>
struct access_pack<myobject>:
public classdesc::NullDescriptor<classdesc::pack_t> {};
template <>
struct access_unpack<myobject>:
public classdesc::NullDescriptor<classdesc::pack_t> {};
}
#include <classdesc_epilogue.h>
int main()
{
Graph g;
g.AddObject<myobject>(0);
g.objects[0]->push_back(g.objects[0]);
g.AddObject<myobject>(1);
g.objects[1]->push_back(g.objects[1]);
return &(*g.objects[0])[0] == &g.objects[0];
}