Date
2013-05-03.00:00:00
Message id
4328

Content

Additional note, April, 2013:

There is implementation variance in the treatment of the following example:

  struct A {
    A() { puts("ctor"); }
    A(const A&) { puts("copy"); }
    const A&get() const { return *this; }
    ~A() { puts("dtor"); }
  };
  struct B { B(A, A) {} };

  typedef A A2[2];
  A2 a = { A().get(), A().get() };
  B b = { A().get(), A().get() };
  int c = (A2{ A().get(), A().get() }, 0);
  int d = (B{ A().get(), A().get() }, 0);

  int main() {}