summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/utils/test_any.cc
diff options
context:
space:
mode:
authorschodet2005-03-13 20:26:23 +0000
committerschodet2005-03-13 20:26:23 +0000
commitfcfd616f76345787a8eb1318e482ab1076d50039 (patch)
treeadb7200c223de2cd3839bf9c922894f48f377dae /2005/i/robert/src/utils/test_any.cc
parenta5ccb9a2944290075e032a8a18102a046841e808 (diff)
Ajout de commentaires.
Ajout de l'ObjectBinder.
Diffstat (limited to '2005/i/robert/src/utils/test_any.cc')
-rw-r--r--2005/i/robert/src/utils/test_any.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/2005/i/robert/src/utils/test_any.cc b/2005/i/robert/src/utils/test_any.cc
index e8af644..85d2319 100644
--- a/2005/i/robert/src/utils/test_any.cc
+++ b/2005/i/robert/src/utils/test_any.cc
@@ -33,7 +33,9 @@ main (int argc, char **argv)
any a (45), b (std::string ("toto")), c (5.4), d (std::string ("5"));
try
{
+ // Direct call to output operator.
std::cout << a << ' ' << b << ' ' << c << ' ' << d << std::endl;
+ // Here, it tries to extract the contained data.
std::cout << any_cast<int> (a) << std::endl;
std::cout << any_cast<std::string> (b) << std::endl;
std::cout << any_cast<double> (c) << std::endl;