memgraph/poc/isolation.cpp

27 lines
569 B
C++
Raw Normal View History

2016-08-26 19:21:42 +08:00
// Making it as first import will prevent accidentaly importing to isolated
// other code.
#include "isolation/isolated.hpp"
#include <iostream>
#include "isolation/db.hpp"
#include "isolation/header.hpp"
2016-08-28 22:47:13 +08:00
// using namespace base;
2016-08-26 19:21:42 +08:00
int main()
{
std::cout << sizeof(Accessor) << " : " << alignof(Accessor) << "\n";
2016-08-28 22:47:13 +08:00
std::cout << sizeof(sha::Accessor) << " : " << alignof(sha::Accessor)
<< "\n";
2016-08-26 19:21:42 +08:00
Db db;
db.data = 207;
auto ret = sha::do_something(reinterpret_cast<sha::Db &>(db));
std::cout << ret << std::endl;
return 0;
}