Implementing Concepts

This document describes the implementation of the “Indiana” concepts proposal [GSW05]. We relate the challenges we faced in the development of ConceptGCC, our prototype compiler for C++ with concepts. ConceptGCC, based on the GNU C++ compiler [GCC05], provides support for all major features of the concept proposal [GSW05] and includes an updated Standard Library implementation that uses concepts extensively. We also discuss the compiler for G, a language designed specifically for Generic Programming, to illustrate how one can implement concepts cleanly in a new compiler. The intent of this document is to inform implementors of the interesting and difficult details of implementing concepts and advise implementors how to approach the task. Additionally, we hope to provide users and implementors alike a clearer picture of the compilation model required to fully support concepts and give a feel of how users will program with concepts. It is strongly recommended that the reader be familiar with the Indiana concepts proposal, N1849, prior to reading this document.