digitalmars.D.learn - getOverloads, but also include all the imported members
- Yuxuan Shui (8/8) Mar 23 2016 Say:
- Marc =?UTF-8?B?U2Now7x0eg==?= (3/11) Mar 24 2016 Add in module two:
- Adam D. Ruppe (3/12) Mar 24 2016 Indeed, the two funcs are NOT overloaded right now unless you add
- Yuxuan Shui (2/16) Mar 24 2016 Is there a way to do this automatically?
- Adam D. Ruppe (3/4) Mar 24 2016 No. You have to decide to bring them together if you want them to
- Yuxuan Shui (4/8) Mar 25 2016 Oh, sorry, this is not what I meant.
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?
Mar 23 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;
Mar 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:Indeed, the two funcs are NOT overloaded right now unless you add that alias. See : http://dlang.org/hijack.html for details.module one; void func(int a){} ///////////////////// module two; import one; void func(float a){}Add in module two: alias func = one.func;
Mar 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:Is there a way to do this automatically?On Wednesday, 23 March 2016 at 20:54:20 UTC, Yuxuan Shui wrote:Indeed, the two funcs are NOT overloaded right now unless you add that alias. See : http://dlang.org/hijack.html for details.module one; void func(int a){} ///////////////////// module two; import one; void func(float a){}Add in module two: alias func = one.func;
Mar 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.
Mar 24 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: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?Is there a way to do this automatically?No. You have to decide to bring them together if you want them to overload.
Mar 25 2016