www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - static and instance opDispatch

reply John Chapman <johnch_atms hotmail.com> writes:
Is there any reason both static and instance opDispatch can't 
coexit in the same enclosing type? The compiler seems to be able 
to detect if it's the static version or not so I'm assuming they 
wouldn't clash?
Nov 19 2018
parent Steven Schveighoffer <schveiguy gmail.com> writes:
On 11/19/18 2:51 PM, John Chapman wrote:
 Is there any reason both static and instance opDispatch can't coexit in 
 the same enclosing type? The compiler seems to be able to detect if it's 
 the static version or not so I'm assuming they wouldn't clash?
You can call static functions on instances too. -Steve
Nov 19 2018