accounts["brokerageAccount"] = map<string, boost::any>;
You can not assign type to object. To fix problem add ()
accounts["brokerageAccount"] = map<string, boost::any>();
Variant that should be compiled correctly is:
#include <boost/any.hpp>
#include <map>
#include <string>
int main()
{
std::map<std::string, boost::any> accounts;
accounts["cash"] = 100;
accounts["brokerageAccount"] = std::map<std::string, boost::any>();
}