On 9/3/16 3:09 AM, Walter Bright wrote:
[snip]

What would be really nice is to allow ADL easily and without fuss when needed. On Manu's example:

module bob;
struct S {}
void f(S s);

module joe;
struct T {}
void f(T t);

module myalgorithm;
void test(T)(T t)
{
  mixin(adl!(T, "f"));
  f(t);
}

So adl!(T, "f") expands to an import of f from T's module if it defines a function f, or nothing if it doesn't.

Generally I agree that there's more upside to not introducing ADL for D.


Andrei

        • Re: ADL Andrei Alexandrescu via Digitalmars-d
    • Re: ADL Timon Gehr via Digitalmars-d
      • Re: ADL Walter Bright via Digitalmars-d
        • Re: ADL Walter Bright via Digitalmars-d
      • Re: ADL Stefan Koch via Digitalmars-d
  • Re: ADL Manu via Digitalmars-d
  • Re: ADL Walter Bright via Digitalmars-d
  • Re: ADL John Colvin via Digitalmars-d
  • Re: ADL Walter Bright via Digitalmars-d
  • Re: ADL Walter Bright via Digitalmars-d
  • Re: ADL Andrei Alexandrescu via Digitalmars-d
  • Re: ADL Andrei Alexandrescu via Digitalmars-d
    • Re: ADL Manu via Digitalmars-d
    • Re: ADL Timon Gehr via Digitalmars-d
      • Re: ADL Andrei Alexandrescu via Digitalmars-d
        • Re: ADL deadalnix via Digitalmars-d
        • Re: ADL Timon Gehr via Digitalmars-d
        • Re: ADL Guillaume Boucher via Digitalmars-d
  • Re: ADL Ethan Watson via Digitalmars-d
    • Re: ADL Walter Bright via Digitalmars-d

Reply via email to