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)
|