]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/spirit/test/qi/stream.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / spirit / test / qi / stream.cpp
index 3d764e53852ada1445708e8a9732eeac4cb03f45..e7ccb443f16eb88bd2179328ce64738a5b93e4ad 100644 (file)
@@ -48,6 +48,11 @@ int main()
                 stream_parser<char, complex>(), c, blank) && 
             c.a == 1.0 && c.b == 2.5);
 
+        boost::variant<complex, double> cd;
+        BOOST_TEST(test_attr("{1.0",
+                stream_parser<char, complex>() | "{" >> double_, cd, blank) && 
+            boost::get<double>(cd) == 1.0);
+
         boost::fusion::vector<complex, double> d;
         BOOST_TEST(test_attr("{1.0,2.5},123.456", 
                 stream >> ',' >> double_, d, blank) &&