From -6748605779077893544
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,41c422257f67d844,start
X-Google-Attributes: gidf78e5,public
From: Martin Lang <Martin.Lang@stgl.sel.alcatel.de>
Subject: Difference in constructor invokation
Date: 1997/07/03
Message-ID: <33BA74FF.4128@stgl.sel.alcatel.de>#1/1
X-Deja-AN: 254307515
X-Original-Date: Wed, 02 Jul 1997 17:34:24 +0200
Organization: Alcatel SEL AG Stuttgart
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUBM7vP20y4NqrwXLNJAQGLIQH+KvUmz6y919YpxzWcgpNUW5bz+NAd3+QT zE7rKeOyAtHaaQ3Ea8jHx64luuWPOaaisobbPTu2o3k3jXwkTmkiRQ== =8Hzm
Reply-To: Martin.Lang@stgl.sel.alcatel.de
Newsgroups: comp.std.c++
Originator: austern@isolde.mti.sgi.com


Is there a difference if the object in the following example is
created by copy construction or by initialization construction?

class A {
public:
	A(int v);
	A(const A& rhs);
private:
	int value;
};


class B {
public:
	B(int v);
	operator int()  const;
private:
	int value;
};


void f(const B& x)
{
	A a1= x;    // ???
	A a2(x);    // ???
}
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu 
]



