On 9/4/16 12:28 AM, Walter Bright wrote:
On 9/3/2016 1:43 PM, Andrei Alexandrescu wrote:
On 9/3/16 10:43 PM, Walter Bright wrote:
On 9/3/2016 8:34 AM, Manu via Digitalmars-d wrote:
And if either module doesn't have an instance of func?

static if (traits(compiles, ModuleOf!T.func))
    alias func = ModuleOf!T.func;

What's an elegant way to encapsulate this as a stutter-free one-liner?
-- Andrei

using a template and mixing it in

"Show me the mo^H^Hcode."
  • Re: ADL Manu via Digitalmars-d
  • Re: ADL vit via Digitalmars-d
  • Re: ADL Andrei Alexandrescu via Digitalmars-d
  • Re: ADL Walter Bright via Digitalmars-d
  • Re: ADL Andrei Alexandrescu via Digitalmars-d
  • Re: ADL Walter Bright via Digitalmars-d
  • Re: ADL Manu via Digitalmars-d
  • Re: ADL Walter Bright via Digitalmars-d
  • Re: ADL Andrei Alexandrescu via Digitalmars-d
  • Re: ADL Walter Bright via Digitalmars-d
  • Re: ADL Andrei Alexandrescu via Digitalmars-d
  • Re: ADL Walter Bright via Digitalmars-d
  • Re: ADL Andrei Alexandrescu via Digitalmars-d
  • Re: ADL Walter Bright via Digitalmars-d
  • Re: ADL Timon Gehr via Digitalmars-d
  • Re: ADL Walter Bright via Digitalmars-d
  • Re: ADL ZombineDev via Digitalmars-d
  • Re: ADL Walter Bright via Digitalmars-d
  • Re: ADL Andrei Alexandrescu via Digitalmars-d
  • Re: ADL Walter Bright via Digitalmars-d
  • Re: ADL Timon Gehr via Digitalmars-d

Reply via email to