Topic: Initialization Question


Author: suresh@bird.printrak.com (Suresh Vaidyanathan)
Date: 1995/08/04
Raw View
Sometime ago, someone posted an example where the following
syntax for initialization:

 T some_t(Initial_Value);

would not work, and you were forced to use the other technique:

 T some_t = Initial_Value;

Can someone (not necessarily the same one) please repost this!





Author: jason@cygnus.com (Jason Merrill)
Date: 1995/08/04
Raw View
>>>>> Suresh Vaidyanathan <suresh@bird.printrak.com> writes:

> Sometime ago, someone posted an example where the following
> syntax for initialization:

>  T some_t(Initial_Value);

> would not work, and you were forced to use the other technique:

>  T some_t = Initial_Value;

> Can someone (not necessarily the same one) please repost this!

A a(A()); // declares a function taking and returning A
A a = A(A()); // declares an object

Jason