Template-style polymorphism in table structure
    Kagamin via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Fri Sep  9 05:13:49 PDT 2016
    
    
  
On Monday, 5 September 2016 at 06:45:07 UTC, data pulverizer 
wrote:
> I just realized that typeid only gives the class and not the 
> actual type, so the object will still need to be cast as you 
> mentioned above, however your above function will not infer T, 
> so the user will have to provide it. I wonder if there is a way 
> to dispatch the right type by a dynamic cast or I fear that 
> ZombineDev may be correct and the types will have to be 
> limited, which I definitely want to avoid!
If you know at compile time that column 0 is of type int, you 
don't have freedom at run time to add non-int column 0.
    
    
More information about the Digitalmars-d-learn
mailing list