TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: FRANK ADAM
from: JERRY COFFIN
date: 1997-09-09 23:32:00
subject: ctors

On (07 Sep 97) Frank Adam wrote to Jerry Coffin...
 FA> Actually is the ctor considered a member function or not ?
A ctor is considered a ctor.  Though ctor's bear some relationship to
normal functions, they're more or less unique unto themselves.  For
example, ctors (in common with assignment operators) will be synthesized
if you don't provide themself.
 JC> And there'd be no way to use this in conversion ctors, etc.
 JC> either.
 FA> Got me, what's a "conversion ctor" ?
Just a ctor that provides a conversion from some other type, and gets
used to construct a temporary object from some other type, such as:
class X {
    X(int);
};
somefunc(X const &thing);
    somefunc(1);
In this case, X::X(int) is called to construct a temporary X from 1,
then the result of that is passed to somefunc.
    Later,
    Jerry.
--- PPoint 1.90
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.