
Dear list,
In the manual of boost::variant:
OutputStreamable: For any object t of type T, std::cout << t must be a
valid expression.
However, I can not output a variant vector work by defining ostream&
operator<< vector<double> . Attached is a test case. Note that variant
int, string can be outputed, but not the vector. Yet, cout <<
vector<double> is working.
I am using gcc 3.2.2 on linux redhat 9.
Many thanks in advance.
Bo
#include "boost/variant.hpp"
using namespace std;
#include <string>
#include <vector>
typedef boost::variant