challenge: implement the max function

Andrey Khropov andkhropov_nosp at m_mtu-net.ru
Tue Jan 23 05:45:22 PST 2007


Andrei Alexandrescu (See Website for Email) wrote:

> * First off, specifying storageof(T) T as the type of a function
> argument means that the compiler will deduce the storage class of the
> actual argument: if the argument is an lvalue, inout will be deduced.

Ok, but now D doesn't allow to return lvalues from functions, so this won't
satisfy (c) for any type except classes that define opMulAssign.

-- 
AKhropov



More information about the Digitalmars-d mailing list