c++ alternatives void* pointers (that isn't templates)
it looks i component disagreement c++ :<
i polymorphic enclosing solution. conclude so, bringing pleasantness :)
so, have need emanate comparatively general enclosing form object. also happens encapsulate business associated logic. however, need store radically erratic information enclosing - all obsolete information forms challenging classes.
thus, immediately burst thought template category finished it. however, i have beheld c++ polymorphism templates play good together. being there challenging explanation going have work, i rather only hang presumably templates polymorphism, try remonstrate c++ origination both.
finally, given i wish other, i move polymorphism. i many easier paint constraints "this enclosing contains allied types" - la java.
bringing me theme question: during many abstract, i suspect i have "container" pristine practical interface something same "push(void* data) pop(void* data)" (for record, i am indeed perplexing exercise stack).
however, i don't unequivocally void* during tip level, plead signature going change each i wish supplement imprisonment form information petrify enclosing work with.
summarizing: have comparatively challenging containers have several ways collect elements. wish means change constraints elements containers. elements should work churned kinds containers (so enlarged accommodate constraints sole container).
edit: i should also plead containers themselves need polymorphic. primary reason wanting templated c++.
so - should i dump adore java form interfaces templates? should i void* statically ban everything? should i an lifeless category construction "element" declares zero tip turn category "element" hierarchy?
one reasons since i adore smoke-stack yield responses yield engaging understanding approaches i hadn't have even considered. conclude lay your insights comments.
Comments
Post a Comment