summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/config/test_config_data.cc
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/config/test_config_data.cc')
-rw-r--r--2005/i/robert/src/config/test_config_data.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/2005/i/robert/src/config/test_config_data.cc b/2005/i/robert/src/config/test_config_data.cc
index 87e36ea..49fc425 100644
--- a/2005/i/robert/src/config/test_config_data.cc
+++ b/2005/i/robert/src/config/test_config_data.cc
@@ -23,6 +23,10 @@
//
// }}}
#include "config_data.hh"
+#include "config.hh"
+
+#include <iterator>
+#include <algorithm>
int
main (int argc, char **argv)
@@ -32,7 +36,18 @@ main (int argc, char **argv)
ConfigData cd (argc, argv);
for (int i = 1; i < argc; ++i)
{
- std::cout << cd.get (argv[i]) << std::endl;
+ const any &a = cd.get (argv[i]);
+ if (a.type () == typeid (Config::IntList))
+ {
+ const Config::IntList &il = any_cast<Config::IntList> (a);
+ std::copy (il.begin (), il.end (),
+ std::ostream_iterator<int> (std::cout, " "));
+ std::cout << std::endl;
+ }
+ else
+ {
+ std::cout << cd.get (argv[i]) << std::endl;
+ }
}
}
catch (const std::exception &e)