> 
> **Possible Duplicates:**  
> 
> [constructor invocation mechanism](https://stackoverflow.com/questions/4283576/constructor-invocation-mechanism)  
> 
> [Why is it an error to use an empty set of brackets to call a constructor with no arguments?](https://stackoverflow.com/questions/180172/why-is-it-an-error-to-use-an-empty-set-of-brackets-to-call-a-constructor-with-no) 
> 
> 
> 

Why can this [code](http://ideone.com/EogJD) elide all copies of A?

```
#include <iostream>

class A
{
public:
  A() {}
  A(const A&) { std::cout << "Copy" << std::endl; }
};

class B
{
public:
  B(const A& a_) : a(a_) {}
private:
  A a;
};

int main()
{
  B b(A());
}

```

This code apparently makes no copies of `A`, and outputs nothing under gcc 3.4 at ideone.