11 Jul
2008
11 Jul
'08
11:21 p.m.
on Fri Jul 11 2008, Simon Pickles
I was hoping to be able to call one function with different args, wrapping those args somehow.
In python, I could call a function with a list, dict or tuple. Since this one object was the argument, it didn't matter what it contained.
I know I could pass a vector in C++, but this needs a single data type. In python I could call:
MyFunc((1, "2", anObject)) # - all in a tuple MyFunc(("aardvark", 42)) # another tuple
Anyway to replicate this very convenient functionality?
Make MyFunc a function template and use Boost.Range? -- Dave Abrahams BoostPro Computing http://www.boostpro.com