Aspect ++ was a worthy attempt, but university projects do not often continue, because products are usually not reliable, original scientists lose interest and graduate students who build it. This is similar to the case when I wrote this answer in 2010. To my surprise, AspectC ++ still seems to be actively developing in 2017. If you only need aspects for C ++, this is probably worth a look.
Aspect-oriented programming is just a special kind of program transformation ("find places matching this condition (" pointcut "and do it with code in that place"). So, if you have a software conversion tool, you can easily emulate AOP. To convert to C ++, you need a strong C ++ interface, as well as the ability to convert and restore code. OpenC ++ was a C ++ conversion project where transformations are encoded exclusively as procedural AST walks with procedural AST modifications. A particular problem was that the C ++ dialect was handled by OpenC ++; in particular, I'm not sure if the templates processed with OpenC ++ or the complete common dialects (GCC, MS) are C +; however, I do not have direct experience with him, just a keen fan of such tools.
Our DMS Software Reengineering Toolkit is a universal program transformation parameterized by language definitions. It has robust definitions for GCC and C ++ MS dialects . You can implement software transformations procedurally, as OpenC ++ does, or, more conveniently, you can write source-oriented transformations with source code (or, more often, mix them to achieve complex effects). DMS is used to carry out large-scale restructuring of large-scale C ++ codes (see Example: reconstructing models of C ++ components using automatic program conversion ). DMS is actively supported, but commercially.
EDIT March, 2015: Now C ++ 14 in GCC and MS dialects.
EDIT July 2017: now C ++ 17 in the GCC and MS dialog box.
source share