Ok, now it work well, thanks!
But..I have another problem. In this code (C++11 with std::tuple)
#include <iostream>
#include <map>
#include <tuple>
#include
using namespace std;
struct data
{
int a,b;
char name[50];
std::mapstd::string,std::tuple<uint16_t,uint16_t> myComplexType;
};
struct myStruct
{
struct MyOrderTag {};
typedef boost::singleton_pool poolMemory;
};
int main()
{
data *d = (data*)myStruct::poolMemory::malloc();
d->a = 8;
strcpy(d->name,"Hello!");
//fill myComplexType field (this row causes a segfault!)
d->myComplexType["one"] = std::tuple(1,2);
myStruct::poolMemory::release_memory();
return 0;
}
I obtain a segmentation fault error when assign a tuple at myComplexType
field. What is wrong?
--
View this message in context: http://boost.2283326.n4.nabble.com/Pool-Use-singleton-pool-in-struct-tp46367...
Sent from the Boost - Users mailing list archive at Nabble.com.