Thread overview
getOverloads, but also include all the imported members
Mar 23, 2016
Yuxuan Shui
Mar 24, 2016
Marc Schütz
Mar 24, 2016
Adam D. Ruppe
Mar 24, 2016
Yuxuan Shui
Mar 24, 2016
Adam D. Ruppe
Mar 25, 2016
Yuxuan Shui
March 23, 2016
Say:

module one;
void func(int a){}

/////////////////////

module two;
import one;
void func(float a){}

Is there a way to get both func() in module two?
March 24, 2016
On Wednesday, 23 March 2016 at 20:54:20 UTC, Yuxuan Shui wrote:
> Say:
>
> module one;
> void func(int a){}
>
> /////////////////////
>
> module two;
> import one;
> void func(float a){}
>
> Is there a way to get both func() in module two?

Add in module two:

alias func = one.func;
March 24, 2016
On Thursday, 24 March 2016 at 12:11:33 UTC, Marc Schütz wrote:
> On Wednesday, 23 March 2016 at 20:54:20 UTC, Yuxuan Shui wrote:
>> module one;
>> void func(int a){}
>> /////////////////////
>> module two;
>> import one;
>> void func(float a){}
>
> Add in module two:
>
> alias func = one.func;

Indeed, the two funcs are NOT overloaded right now unless you add that alias. See : http://dlang.org/hijack.html for details.
March 24, 2016
On Thursday, 24 March 2016 at 13:55:31 UTC, Adam D. Ruppe wrote:
> On Thursday, 24 March 2016 at 12:11:33 UTC, Marc Schütz wrote:
>> On Wednesday, 23 March 2016 at 20:54:20 UTC, Yuxuan Shui wrote:
>>> module one;
>>> void func(int a){}
>>> /////////////////////
>>> module two;
>>> import one;
>>> void func(float a){}
>>
>> Add in module two:
>>
>> alias func = one.func;
>
> Indeed, the two funcs are NOT overloaded right now unless you add that alias. See : http://dlang.org/hijack.html for details.

Is there a way to do this automatically?
March 24, 2016
On Thursday, 24 March 2016 at 15:07:09 UTC, Yuxuan Shui wrote:
> Is there a way to do this automatically?

No. You have to decide to bring them together if you want them to overload.
March 25, 2016
On Thursday, 24 March 2016 at 15:52:49 UTC, Adam D. Ruppe wrote:
> On Thursday, 24 March 2016 at 15:07:09 UTC, Yuxuan Shui wrote:
>> Is there a way to do this automatically?
>
> No. You have to decide to bring them together if you want them to overload.

Oh, sorry, this is not what I meant.

What I wanted to know is if it's possible to automate this aliasing process, by using for example templates?