-
-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathcheck.cc
More file actions
26 lines (20 loc) · 613 Bytes
/
check.cc
File metadata and controls
26 lines (20 loc) · 613 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
/* This is free and unencumbered software released into the public domain. */
#include <cstdio> /* for std::*printf() */
#include <cstdlib> /* for EXIT_FAILURE, EXIT_SUCCESS */
#include <lmdb++.h>
int main() {
try {
/* Create the LMDB environment: */
auto env = lmdb::env::create();
/* Open the LMDB environment: */
env.open("/tmp");
/* Begin the LMDB transaction: */
auto txn = lmdb::txn::begin(env);
// TODO
return EXIT_SUCCESS;
}
catch (const lmdb::error& error) {
std::fprintf(stderr, "Failed with error: %s\n", error.what());
return EXIT_FAILURE;
}
}