
Hi, I've implemented a simple, low level json formatting utility to
complement tinyjson's lightweight parser. To do this, I've extended
boost::any only to add a "format()" function to it that is aware of what
types the content can take in a json structure and produces the
appropriate string. The default constructor and the constructor with a
value are the only things I implemented, aside from the format
function. Both just call the base constructor. Compiled in gcc,
everything works fabulously. Apparently, a functioning assignment
operator and copy constructor are appropriately inherited and everything
runs great. On windows, however, some subtle difference causes
assignment and copies to seg-fault. The real problem is that, for the
life of me, I can't find a way to implement assignment or copies
explicitly, that doesn't also bomb out. I can probably come up with a
work around that stores my type in shared pointers so they're never
actually copied, but I'm really curious if anyone could explain what
causes this. Here are some code snippets to illustrate the behavior:
void test(){
std::cout<<"messing around with boost
any"<