I would like to overload << operator for chaining like below
function1(param1, param2)<< obj2 << obj3 << string4
function1 would return an object.
What I want to do is after string4, I need to call a function using param1, param2.
My questions will be
How do I know string4 is the last parameters in the expression and hence I need to call another function2 using param1 and param2 or it isn't possible to do so?
How do I pass param1 and param2 to the function to be called? I could not store the param1 and param2 in the object as it is a multithreaded.
Thanks.