Do pure functions solve the "return const" problems?
Janice Caron
caron800 at googlemail.com
Thu Apr 3 22:51:24 PDT 2008
On 04/04/2008, Christopher Wright <dhasenan at gmail.com> wrote:
> Fine, assuming pure arrives after multiple return values.
Well that's a done deal, since multiple return values arrived a few
releases back. Witness my prior example, but here's another one:
import std.typecons;
Tuple!(int,int,int,double) f()
{
return Tuple!(int,int,int,double)(10, 20, 42, 3.14);
}
auto t = f();
auto x = t._0; // 10
auto y = t._1; // 20
auto z = t._2; // 42
auto g = t._3; // 3.14
More information about the Digitalmars-d
mailing list