[go: up one dir, main page]

Menu

[f77b10]: / test / rb.d  Maximize  Restore  History

Download this file

37 lines (26 with data), 526 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
import std.stdio ;
import std.algorithm;
import std.range ;
import tools ;
import core.lifetime ;
import std.bitmanip ;
import tree ;
struct S
{
int i = 42 ;
string s ;
} ;
int
main()
{
auto fd = new Fd("a.db", true );
writeln("FD : ", fd.get_path() , " ", fd.get_fd());
void[] m = fd.Mmap(0L);
fd.MmapToRW(m);
auto s = emplace!S(m);
writeln("S: ", *s );
// auto rt1 = new RedBlackTree!(int, "a < b", false)();
// auto t = emplace!(RedBlackTree)(m);
// writeln("T: ", *t );
return 0 ;
}