I am trying to put type specialization in one general function. I am not sure how to implement variable size argument list, should I use features from the new c++ standard, should I use va_list, or else ? Here is some pseudo code for specializing 5 types:
http://ideone.com/pgLwk The code is repeating a lot don't worry. If I make this work it is still a whole lot better then having more type specialization functions for each algorithm I will work on. The call hierarchy would be ImageBufAlgo::over -> speciaize_type -> over_alg. You can look at it as three layers: public -> type specialization -> algortihm. In the public layer we can have input validation and in the algorithm layer the algorithm itself as pure as possible.
_______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
