Actually, I have used this paper for the dispatch table generation. I also used the table compression method from [2]. [2] "Fast Algorithms for Compressed Multi-Method Dispatch Tables Generation" by Dujardin, Amiel, Simon For now, the library works as follows : - classes to be used must inherit a CRTP class defining the small integer tag - multimethods are declared out of class - multimethods definitions may be spread across several compilation units - at first call to the multimethod, the dispatch table is computed using the algorithms from [1] and [2] - subsequent calls use the memorized table Do you think this code may reach interest for inclusion in boost ? Of course, I plan to support multiple inheritance before any submission. Best regards, Camille Gillot Le mercredi 5 mars 2014 20:26:06 Vinícius dos Santos Oliveira a écrit :
Em Qui, 2014-03-06 às 00:05 +0100, Camille GILLOT escreveu:
For now, I have implemented a toy library for open multiple dispatch. It is based on compressed dispatch tables. It still just supports single inheritance and needs to attach integer tags to the dispatched class hierarchy.
You may be interested in read this Bjarne's paper on the subject[1], if I understood what you mean by "multiple dispatch" correctly.