
Hello,
I have a simple program to test boost::variant. Under Visual C++
2005, configuration Release (/MD), the build fails with C1060 (out of
heap space). The program compiles and runs as expected under Visual
C++ 2005 Debug (/MTd), and under Visual C++ 2008 Express, Release and
Debug.
Below is the code. Any idea what's wrong?
Many Thanks,
Eric
#include <set>
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
#include <map>
#include , std::vector class print_visitor : public boost::static_visitor<> {
std::string m_indent;
public:
print_visitor(const std::string& indent) : m_indent(indent) {}
print_visitor(const print_visitor& p) : m_indent(p.m_indent) {}
void operator()(const bool& i) const {
std::cout << m_indent << "It's an bool: " << i << '\n';
}
void operator()(const std::string& s) const {
std::cout << m_indent << "It's a std::string: " << s << '\n';
}
void operator()(const double& d) const {
std::cout << m_indent << "It's a double: " << d << '\n';
}
void operator()(const long& d) const {
std::cout << m_indent << "It's a long: " << d << '\n';
}
void operator()(const empty_property_tag& e) const {
std::cout << m_indent << "It's an empty_property_tag.\n";
}
void operator()(std::vector