Is it allowed to instantiate a class without specified variable name in C++
<p>I have these two classes:</p>

<pre><code>class Foo
{
public:
      Foo() { std::cout &lt;&lt; "in Foo constructor" &lt;&lt; std::endl; }
};
class Bar
{
public:
    Bar() {};
    Bar(Foo foo);
private:
    Foo m_foo;
};

Bar::Bar(Foo foo) :
    m_foo(foo)
{
    std::cout &lt;&lt; "in Bar constructor with argument Foo" &lt;&lt; std::endl;
}

int main() {
    Bar bar(Foo()); // is something wrong here ?
    return 0;
}
</code></pre>

<p>I compiled and excuted it , nothing printed on screen, what did <code>Bar bar(Foo())</code> do ? 
I have seen similarity in <a href="http://stackoverflow.com/questions/620137/do-the-parentheses-after-the-type-name-make-a-difference-with-new">Do the parentheses after the type name make a difference with new?</a>   and   <a href="http://stackoverflow.com/questions/2776313/foo-f-foo-no-matching-function-for-call-to-foofoofoo-huh">Foo f = Foo(); // no matching function for call to 'Foo::Foo(Foo)'</a>, but I still can't figure out.</p>
