Handle unknown number of undefined objects for logging
<p>Trying to reproduce something that in C# you would do something like this: </p>

<pre><code> string FormatString(params object[] args) {
      return string.Format(CultureInfo.InvariantCulture, args);
 }
</code></pre>

<p>And in Obj-c it would look like this:</p>

<pre><code>#include &lt;stdarg.h&gt;

void logObjects(id firstObject, ...) {
    va_list args;
    va_start(args, firstObject);
    id obj;
    for (obj = firstObject; obj != nil; obj = va_arg(args, id))
        NSLog(@"%@", obj);
    va_end(args);
}

logObjects(@"foo", [NSNumber numberWithInt:4], @"bar", nil);
</code></pre>

<p>I'm familiar with variable parameter length but not too sure how to store the args and then send them to std::cout. Is this even possible? </p>

<p>Notice! I want to send any kind of object which can handle the &lt;&lt; operator. Just look at this function as a substitute for:</p>

<pre><code>std::cout &lt;&lt; "test" &lt;&lt; someObject &lt;&lt; int &lt;&lt; someOtherObject; 
</code></pre>

<p>I am using boost and would like to keep it platform independent. This function will be part of a logging class in a shared lib. </p>
