Saturday, June 25, 2016

boost::any

My first attempt at using boost::any.

Adapted this code from here:

Here's the sample output:

nonbonding@castor-ub:~/dnonbonding/tmp/any$ g++ -std=c++11 -I/home/nonbonding/dnonbonding/bin/boost_1_60_0 c.cpp 
nonbonding@castor-ub:~/dnonbonding/tmp/any$ ./a.out 
#empty == 1
#int == 2
#const char * == 2
#string == 1
1 hello (empty) there world 6 
nonbonding@castor-ub:~/dnonbonding/tmp/any$ 

No comments:

Post a Comment