IDE - Clion, C++11, Boost Version 1.57.0
Why doesn't work this code?
#include "boost/any.hpp"
...
boost::any var = 1550; // Works
var = "String"; // Error
But works fine this one:
#include "boost/any.hpp"
...
boost::any var = 1550; // Works
var = string("String"); // Works
Can you explain me reason of this error?