This is an example of how to use the STL string with Metall.
#include <iostream>
#include <boost/container/string.hpp>
#include <string>
using persistent_string =
boost::container::basic_string<char, std::char_traits<char>,
{
auto pstr =
manager.construct<persistent_string>(
"mystring")(
"Hello, World!",
manager.get_allocator<>());
std::cout << *pstr << std::endl;
}
{
auto pstr =
manager.find<persistent_string>(
"mystring").first;
std::cout << *pstr << std::endl;
}
return 0;
}
int main()
Definition: jgraph.cpp:24