mrrational
MModular
•Created by mrrational on 8/2/2024 in #questions
How to overload methods of generic structs to target particular types
Consider the snippet below:
I would like to add a get_decimal method which dispatches differently based on the type of T. For example if T is Int it should return False and True if T is a Float64
I have tried something like below and get a Compiler Error:
The Error:
Thanks in advance for the help
6 replies