User:Zachsaw/sandbox

MCP (Managed C++ for GCC) is a GCC plugin and C++ framework that enables C++ programmers to use Microsoft C++/CLI-like syntax for automatic garbage collection (GC) support. It uses Boehm GC in the same precise mode as GNU Java Compiler (GJC) and Mono, where objects and arrays have their pointers precisely traced. In MCP, precisely traced objects and arrays are created via  and   operators respectively. MCP is free software and is licensed under the GPL license.

MCP consists of three parts - the GCC plugin (libmcp), the compiler replacement and the framework.

MCP's GCC plugin (libmcp) parses your source file for managed classes or structs and creates intermediate files containing information about the layout of the managed objects.

The compiler replacement (mcp) is a direct replacement for calling gcc/g++ to compile your C++ source files. It allows for easy IDE integration or replacing gcc/g++ with mcp as the compiler in Makefile.

The framework consists of APIs necessary to replicate C++/CLI's GC features within the confines of C++0x / C++11. C++/CLI specific language extensions such as Pointer^ and array^ with their respective allocator keywords ( and  ) are equivalent to MCP's   and   respectively. Another important template class, gcroot, is faithfully replicated in MCP, while GCHandle is replaced by a templated version.