11 typedef std::tuple<int,float,double,char,std::string> IFDCS;
14 typedef IFDCS_shqed::shared_queued_tuple_type IFDCS_queues;
16 IFDCS_helper ifdcs_helper;
17 IFDCS_shqed ifdcs_shqed;
19 std::vector<std::string> typenames = ifdcs_helper.type_names();
20 for (
auto tn : typenames) {
24 IFDCS ifdcs{1,2.2,3.0e-9,
'a',
"foo"};
26 std::vector<boost::any> anyvec = ifdcs_helper.as_any(ifdcs);
27 std::cerr << boost::any_cast<int>(anyvec[0]) <<
std::endl;
28 std::cerr << boost::any_cast<std::string>(anyvec[4]) <<
std::endl;
30 auto ifdcs2 = ifdcs_helper.from_any(anyvec);
35 std::get<0>(qs).
push_back(std::make_shared<int>(1));
36 std::get<1>(qs).
push_back(std::make_shared<float>(2.2
f));
37 std::get<2>(qs).
push_back(std::make_shared<double>(3.0
e-9));
38 std::get<3>(qs).
push_back(std::make_shared<char>(
'a'));
39 std::get<4>(qs).
push_back(std::make_shared<std::string>(
"foo"));
41 auto any_q = ifdcs_shqed.as_any_queue(qs);
42 Assert (any_q.size() == 5);
43 for (
auto q : any_q) {
47 auto qs2 = ifdcs_shqed.from_any_queue(any_q);
49 using boost::any_cast;
51 std::cerr <<
"First element from each queue:\n";
52 std::cerr << *std::get<0>(qs2)[0] <<
std::endl;
53 std::cerr << *std::get<1>(qs2)[0] <<
std::endl;
54 std::cerr << *std::get<2>(qs2)[0] <<
std::endl;
55 std::cerr << *std::get<3>(qs2)[0] <<
std::endl;
56 std::cerr << *std::get<4>(qs2)[0] <<
std::endl;
71 std::cerr << std::get<0>(ahahah) <<
" " 72 << std::get<1>(ahahah) <<
" " 73 << std::get<2>(ahahah) <<
"\n";
QTextStream & endl(QTextStream &s)