Closed allopislozano closed 4 years ago
Hi there, the operator << of x3::variant always prints an empty string. Is this a bug?
https://wandbox.org/permlink/qS2XErm6hbi2ZLt9
#include<vector> #include<string> #include <utility> #include <iostream> #define BOOST_SPIRIT_X3_DEBUG #include <boost/spirit/home/x3.hpp> #include <boost/spirit/home/x3/support/ast/variant.hpp> using std::vector; using std::string; namespace x3 = boost::spirit::x3; int main() { using V = boost::variant<string,int>; V v = V(string("hello")); std::cout << "V:" << v << std::endl; using V2 = x3::variant<string,int>; V2 v2 = V2(string("hello")); std::cout << "V2:" << v2 << std::endl; }
This compiles by accident, x3::variant does not have streaming operators.
x3::variant
Hi there, the operator << of x3::variant always prints an empty string. Is this a bug?
https://wandbox.org/permlink/qS2XErm6hbi2ZLt9