Abstract
C++0x is the working title for the revision of the ISO standard of the C++ programming language that was originally planned for release in 2009 but that was delayed to 2011. The largest language extension in C++0x was “concepts”, that is, a collection of features for constraining template parameters. In September of 2008, the C++ standards committee voted the concepts extension into C++0x, but then in July of 2009, the committee voted the concepts extension back out of C++0x.
This article is my account of the technical challenges and debates within the “concepts” effort in the years 2003 to 2009. To provide some background, the article also describes the design space for constrained parametric polymorphism, or what is colloquially know as constrained generics. While this article is meant to be generally accessible, the writing is aimed toward readers with background in functional programming and programming language theory. This article grew out of a lecture at the Spring School on Generic and Indexed Programming at the University of Oxford, March 2010.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Abrahams, D., Gurtovoy, A.: C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (C++ in Depth Series). Addison-Wesley Professional (2004) ISBN 0321227255
Alet, F., Dayal, P., Grzesik, A., Honecker, A., Koerner, M., Laeuchli, A., Manmana, S.R., McCulloch, I.P., Michel, F., Noack, R.M., Schmid, G., Schollwoeck, U., Stoeckli, F., Todo, S., Trebst, S., Troyer, M., Werner, P., Wessel, S.: The ALPS project: open source software for strongly correlated systems. J. Phys. Soc. Jpn. 74, 30 (2005)
Alexandrescu, A.: Modern C++ design: generic programming and design patterns applied. Addison-Wesley Longman Publishing Co., Inc., Boston (2001) ISBN 0-201-70431-5
Austern, M.H.: Generic programming and the STL: Using and extending the C++ Standard Template Library. Professional Computing Series. Addison-Wesley Longman Publishing Co., Inc. (1998) ISBN 0-201-30956-4
Baumgartner, G., Russo, V.F.: Signatures: A language extension for improving type abstraction and subtype polymorphism in c++. Software: Practice and Experience 25(8), 863–889 (1995) ISSN 1097-024X, http://dx.doi.org/10.1002/spe.4380250803 , doi:10.1002/spe.4380250803
Boissonnat, J.-D., Cazals, F., Da, F., Devillers, O., Pion, S., Rebufat, F., Teillaud, M., Yvinec, M.: Programming with CGAL: the example of triangulations. In: Proceedings of the Fifteenth Annual Symposium on Computational Geometry, pp. 421–422. ACM Press (1999) ISBN 1-58113-068-6
Bracha, G., Odersky, M., Stoutamire, D., Wadler, P.: Making the future safe for the past: adding genericity to the java programming language. In: Proceedings of the 13th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 1998, pp. 183–200. ACM, New York (1998) ISBN 1-58113-005-8, doi: http://doi.acm.org/10.1145/286936.286957
Bruce, K., Cardelli, L., Castagna, G., Leavens, G.T., Pierce, B.: On binary methods. Theor. Pract. Object Syst. 1, 221–242 (1995) ISSN 1074-3227, http://dl.acm.org/citation.cfm?id=230849.230854
Bruce, K.B., Odersky, M., Wadler, P.: A statically safe alternative to virtual types. In: ECCOP 1998: Proceedings of the 12th European Conference on Object-Oriented Programming, pp. 523–549. Springer, London (1998) ISBN 3-540-64737-6
Burstall, R.M., Goguen, J.A.: Putting theories together to make specifications. In: IJCAI 1977: Proceedings of the 5th International Joint Conference on Artificial Intelligence, pp. 1045–1058. Morgan Kaufmann Publishers Inc., San Francisco (1977)
Burstall, R.M., Goguen, J.A.: The semantics of CLEAR, a specification language. In: Proceedings of the Abstract Software Specifications, 1979 Copenhagen Winter School, pp. 292–332. Springer, London (1980) ISBN 3-540-10007-5
Burstall, R.M., MacQueen, D.B., Sannella, D.T.: HOPE: An experimental applicative language. In: LFP 1980: Proceedings of the 1980 ACM Conference on LISP and Functional Programming, pp. 136–143. ACM, New York (1980)
Canning, P., Cook, W., Hill, W., Olthoff, W., Mitchell, J.C.: F-bounded polymorphism for object-oriented programming. In: FPCA 1989: Proceedings of the Fourth International Conference on Functional Programming Languages and Computer Architecture, pp. 273–280. ACM (1989) ISBN 0-89791-328-0
Cardelli, L., Wegner, P.: On understanding types, data abstraction, and polymorphism. ACM Comput. Surv. 17(4), 471–523 (1985) ISSN 0360-0300
Cejtin, H., Fluet, M., Jagannathan, S.: StephenWeeks. MLton documentation (July 2007), http://mlton.org/Documentation
Chakravarty, M.M.T., Keller, G., Jones, S.P.: Associated type synonyms. In: ICFP 2005: Proceedings of the tenth ACM SIGPLAN International Conference on Functional Programming, pp. 241–253. ACM Press, New York (2005) ISBN 1-59593-064-7
Chakravarty, M.M.T., Keller, G., Jones, S.P., Marlow, S.: Associated types with class. In: POPL 2005: Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 1–13. ACM Press, New York (2005) ISBN 1-58113-830-X
Chamberlain, B., Deitz, S., Hoffswell, S., Plevyak, J., Zima, H., Diaconescu, R.: Chapel Specification. Cray Inc., 0.796 edn. (October 2010)
Chambers, C., Leavens, G.T.: Typechecking and modules for multimethods. ACM Trans. Program. Lang. Syst. 17, 805–843 (1995) ISSN 0164-0925, doi: http://doi.acm.org/10.1145/218570.218571
Clifton, C., Millstein, T., Leavens, G.T., Chambers, C.: MultiJava: Design rationale, compiler implementation, and applications. ACM Trans. Program. Lang. Syst. 28, 517–575 (2006) ISSN 0164-0925, doi: http://doi.acm.org/10.1145/1133651.1133655
Dawes, B., Abrahams, D., Rivera, R.: Boost C++ libraries
Dos Reis, G., Stroustrup, B.: Specifying C++ concepts. Technical Report N1886, ISO/IEC JTC 1 SC22 WG21 (2005)
Dos Reis, G., Stroustrup, B.: Specifying C++ concepts. In: POPL 2006: Conference Record of the 33rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 295–308. ACM, New York (2006) ISBN 1-59593-027-2
Downey, P.J., Sethi, R., Tarjan, R.E.: Variations on the common subexpression problem. J. ACM 27(4), 758–771 (1980) ISSN 0004-5411
Ernst, E.: gbeta – a Language with Virtual Attributes, Block Structure, and Propagating, Dynamic Inheritance. PhD thesis, Department of Computer Science, University of Aarhus, Århus, Denmark (1999)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design patterns: elements of reusable object-oriented software. Addison-Wesley Longman Publishing Co., Inc., Boston (1995) ISBN 0-201-63361-2
Garcia, R., Lumsdaine, A.: MultiArray: a c++ library for generic programming with arrays. Softw., Pract. Exper. 35(2), 159–188 (2005)
Garcia, R., Järvi, J., Lumsdaine, A., Siek, J.G., Willcock, J.: A comparative study of language support for generic programming. In: OOPSLA 2003: Proceedings of the 18th Annual ACM SIGPLAN Conference on Object-Oriented Programing, Systems, Languages, and Applications, pp. 115–134. ACM Press (2003) ISBN 1-58113-712-5
Garcia, R., Järvi, J., Lumsdaine, A., Siek, J.G., Willcock, J.: An extended comparative study of language support for generic programming. Journal of Functional Programming 17(2), 145–205 (2007)
Girard, J.-Y.: Interpretation fonctionelle et elimination des coupures de l’arithmetique d’ordre superieur. PhD thesis, Paris, France (1972)
Gregor, D.: Type-soundness and optimization in the concepts proposal type-soundness and optimization in the concepts proposal types-soundness and optimization in the concepts proposal. Technical Report N2576, ISO/IEC JTC 1 SC22 WG21 (2008)
Gregor, D., Siek, J.G.: Explicit model definitions are necessary. Technical Report N1798=05-0058, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++ (May 2005)
Gregor, D., Siek, J.G.: Implementing concepts. Technical Report N1848=05-0108, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++ (August 2005)
Gregor, D., Stroustrup, B.: Concepts. Technical Report N2042, ISO/IEC JTC 1 SC22 WG21 (June 2006)
Gregor, D., Järvi, J., Siek, J.G., Reis, G.D., Stroustrup, B., Lumsdaine, A.: Concepts: Linguistic support for generic programming in C++. In: Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2006 (October 2006)
Hall, C.V., Hammond, K., Peyton Jones, S.L., Wadler, P.L.: Type classes in Haskell. ACM Trans. Program. Lang. Syst. 18(2), 109–138 (1996)
Järvi, J.: Tuple types and multiple return values. C/C++ Users Journal 19, 24–35 (2001)
Järvi, J., Powell, G., Lumsdaine, A.: The Lambda Library: unnamed functions in C++. Software—Practice and Experience 33(3), 259–291 (2003)
Järvi, J., Gregor, D., Willcock, J., Lumsdaine, A., Siek, J.G.: Algorithm specialization in generic programming - challenges of constrained generics in C++. In: PLDI 2006: Proceedings of the ACM SIGPLAN 2006 Conference on Programming Language Design and Implementation. ACM Press, New York (2006)
Jenks, R.D., Trager, B.M.: A language for computational algebra. In: SYMSAC 1981: Proceedings of the Fourth ACM Symposium on Symbolic and Algebraic Computation, pp. 6–13. ACM, New York (1981) ISBN 0-89791-047-8
Jones, M.P.: Qualified Types: Theory and Practice. Distinguished Dissertations in Computer Science. Cambridge University Press (1994)
Jones, M.P.: Dictionary-free overloading by partial evaluation. Lisp Symb. Comput. 8, 229–248 (1995) ISSN 0892-4635, http://dl.acm.org/citation.cfm?id=223079.223082 , doi:10.1007/BF01019005
Steele Jr., G.L.: An overview of COMMON LISP. In: LFP 1982: Proceedings of the 1982 ACM Symposium on LISP and Functional Programming, pp. 98–107. ACM Press, New York (1982) ISBN 0-89791-082-6
Kaes, S.: Parametric Overloading in Polymorphic Programming Languages. In: Ganzinger, H. (ed.) ESOP 1988. LNCS, vol. 300, pp. 131–144. Springer, Heidelberg (1988) ISBN 978-3-540-19027-1, http://dx.doi.org/10.1007/3-540-19027-9_9
Kapur, D., Musser, D.R., Stepanov, A.A.: Operators and algebraic structures. In: FPCA 1981: Proceedings of the 1981 Conference on Functional Programming Languages and Computer Architecture, pp. 59–64. ACM Press, New York (1981) ISBN 0-89791-060-5
Kapur, D., Musser, D.R., Stepanov, A.A.: Tecton: A language for Manipulating Generic Objects. In: Staunstrup, J. (ed.) Program Specification 1981. LNCS, vol. 134, pp. 402–414. Springer, Heidelberg (1982) ISBN 3-540-11490-4
Kennedy, A., Don, S.: Design and implementation of generics for the.net common language runtime. In: Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation, PLDI 2001, pp. 1–12. ACM, New York (2001) ISBN 1-58113-414-2, doi: http://doi.acm.org/10.1145/378795.378797
Kershenbaum, A., Musser, D., Stepanov, A.: Higher order imperative programming. Technical Report 88-10, Rensselaer Polytechnic Institute (1988)
Kiczales, G., Lamping, J., Menhdhekar, A., Maeda, C., Lopes, C., Loingtier, J.-M., Irwin, J.: Aspect-Oriented Programming. In: Aksit, M., Auletta, V. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)
Kiselyov, O., Peyton-Jones, S.: Choosing a type-class instance based on the context (2008), http://haskell.org/haskellwiki/GHC/AdvancedOverlap
Köthe, U.: Reusable Software in Computer Vision. In: Handbook on Computer Vision and Applications, vol. 3. Acadamic Press (1999)
Laufer, K., Baumgartner, G., Russo, V.F.: Safe structural conformance for java. The Computer Journal 43(6), 469–481 (2000), http://comjnl.oxfordjournals.org/content/43/6/469.abstract , doi: 10.1093/comjnl/43.6.469
Lee, L.-Q., Siek, J.G., Lumsdaine, A.: The generic graph component library. In: OOPSLA 1999: Proceedings of the 14th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 399–414. ACM Press, New York (1999) ISBN 1-58113-238-7
Leroy, X.: The Objective Caml system: Documentation and user’s manual. With D. Doligez, J. Garrigue, D. Rémy, J. Vouillon (2000)
Liskov, B., Atkinson, R., Bloom, T., Moss, E., Schaffert, C., Scheifler, B., Snyder, A.: CLU reference manual. Technical Report LCS-TR-225. MIT (October 1979)
MacQueen, D.: Modules for standard ML. In: LFP 1984: Proceedings of the 1984 ACM Symposium on LISP and Functional Programming, pp. 198–207. ACM, New York (1984) ISBN 0-89791-142-3
McCarthy, J.: Recursive functions of symbolic expressions and their computation by machine, part i. Commun. ACM 3(4), 184–195 (1960) ISSN 0001-0782
Meyers, S.: Effective STL: 50 specific ways to improve your use of the standard template library. Addison-Wesley Longman Ltd., Essex (2001) ISBN 0-201-74962-9
Millstein, T., Frost, C., Ryder, J., Warth, A.: Expressive and modular predicate dispatch for Java. ACM Trans. Program. Lang. Syst. 31, 7:1–7:54 (2009) ISSN 0164-0925, doi: http://doi.acm.org/10.1145/1462166.1462168
Millstein, T.D., Chambers, C.: Modular Statically Typed Multimethods. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 279–303. Springer, Heidelberg (1999) ISBN 3-540-66156-5, http://portal.acm.org/citation.cfm?id=646156.679834
Milner, R.: A theory of type polymorphism in programming. Journal of Computer and System Sciences 17(3), 348–375 (1978)
Milner, R., Tofte, M., Harper, R.: The definition of Standard ML. MIT Press (1990) ISBN 0-262-63132-6
Musser, D.R., Stepanov, A.: Generic programming. In: ISSAC: Proceedings of the ACM SIGSAM International Symposium on Symbolic and Algebraic Computation (1988)
Musser, D.R., Stepanov, A.A.: A library of generic algorithms in Ada. In: The 1987 Annual ACM SIGAda International Conference on Ada, pp. 216–225. ACM SIGAda (December 1987)
Myers, N.C.: Traits: a new and useful template technique. C++ Report (June 1995)
Nelson, G., Oppen, D.C.: Fast decision procedures based on congruence closure. J. ACM 27(2), 356–364 (1980) ISSN 0004-5411
Odersky, M., Cremet, V., Röckl, C., Zenger, M.: A nominal theory of objects with dependent types. In: ECOOP 2003. LNCS. Springer (2003)
Odersky, M., Altherr, P., Cremet, V., Dragos, I., Dubochet, G., Emir, B., McDirmid, S., Micheloud, S., Mihaylov, N., Schinz, M., Stenmn, E., Spoon, L., Zenger, M.: An overview of the Scala programming language. Technical Report IC/2004/64, EPFL (2004)
Peyton Jones, S., Jones, M., Meijer, E.: Type classes: an exploration of the design space. In: Proceedings of the 2nd Haskell Workshop (June 1997)
Pierce, B.C.: Types and Programming Languages. MIT Press (2002) ISBN 0-262-16209-1
Pitt, W.R., Williams, M.A., Steven, M., Sweeney, B., Bleasby, A.J., Moss, D.S.: The bioinformatics template library: generic components for biocomputing. Bioinformatics 17(8), 729–737 (2001)
Reynolds, J.C.: Towards a Theory of Type Structure. In: Robinet, B. (ed.) Programming Symposium. LNCS, vol. 19, pp. 408–425. Springer, Heidelberg (1974)
Russo, G.L.: An interview with A. Stepanov, http://www.stlport.org/resources/StepanovUSA.html
Siek, J., Widman, J.: Proposed wording for scoped concept maps. Technical Report N2414, ISO/IEC JTC 1 SC22 WG21 (September 2007)
Siek, J.G.: A Language for Generic Programming. PhD thesis, Indiana University (August 2005)
Siek, J.G.: Scoped concept maps. Technical Report N2098, ISO/IEC JTC 1 SC22 WG21 (September 2006)
Siek, J.G., Lumsdaine, A.: The Matrix Template Library: Generic components for high-performance scientific computing. Computing in Science and Engineering 1(6), 70–78 (1999) ISSN 1521-9615
Siek, J.G., Lumsdaine, A.: A Modern Framework for Portable High Performance Numerical Linear Algebra. In: Advances in Software Tools for Scientific Computing. Springer (2000)
Siek, J.G., Lumsdaine, A.: Concept checking: Binding parametric polymorphism in C++. In: Proceedings of the First Workshop on C++ Template Programming, Erfurt, Germany (2000)
Siek, J.G., Lumsdaine, A.: Essential language support for generic programming: Formalization part 1. Technical Report 605, Indiana University (December 2004)
Siek, J.G., Lumsdaine, A.: Essential language support for generic programming. In: PLDI 2005: Proceedings of the ACM SIGPLAN 2005 Conference on Programming Language Design and Implementation, pp. 73–84. ACM Press (June 2005) ISBN 1-59593-056-6
Siek, J.G., Lumsdaine, A.: Language Requirements for Large-Scale Generic Libraries. In: Glück, R., Lowry, M. (eds.) GPCE 2005. LNCS, vol. 3676, pp. 405–421. Springer, Heidelberg (2005)
Siek, J.G., Lumsdaine, A.: A language for generic programming in the large. Science of Computer Programming 76, 423–465 (2011)
Siek, J.G., Lee, L.-Q., Lumsdaine, A.: The Boost Graph Library: User Guide and Reference Manual. Addison-Wesley (2002)
Siek, J.G., Gregor, D., Garcia, R., Willcock, J., Järvi, J., Lumsdaine, A.: Concepts for C++0x. Technical Report N1758=05-0018, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++ (January 2005)
Stepanov, A.A.: Design of generic libraries. Lecture given at SRI (1991)
Stepanov, A.A., Lee, M.: The Standard Template Library. Technical Report X3J16/94-0095, WG21/N0482, ISO Programming Language C++ Project (May 1994)
Stevens, A.: Al stevens interviews alex stepanov. Dr. Dobb’s (March 1995), http://www.sgi.com/tech/stl/drdobbs-interview.html
Stroustrup, B.: What is object-oriented programming? IEEE Softw. 5, 10–20 (1988) ISSN 0740-7459, http://portal.acm.org/citation.cfm?id=624569.624721 , doi:10.1109/52.2020
Stroustrup, B.: Parameterized types for C++. In: USENIX C++ Conference (October 1988)
Stroustrup, B.: The Second ACM SIGPLAN Conference on History of Programming Languages, HOPL-II, pp. 271–297. ACM, New York (1993) ISBN 0-89791-570-4, doi: http://doi.acm.org/10.1145/154766.155375
Stroustrup, B.: Concepts – a more abstract complement to type checking. Technical Report N1510=03-0093, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++ (October 2003), http://www.open-std.org/jtc1/sc22/wg21
Stroustrup, B.: Evolving a language in and for the real world: C++ 1991-2006. In: Proceedings of the Third ACM SIGPLAN Conference on History of Programming Languages, HOPL III, pp. 4-1–4-59. ACM Press, New York (2007) ISBN 978-1-59593-766-7, http://doi.acm.org/10.1145/1238844.1238848
Stroustrup, B.: Simplifying the use of concepts. Technical Report N2906, ISO/IEC JTC 1 SC22 WG21 (June 2009)
Stroustrup, B., Dos Reis, G.: Concepts - design choices for template argument checking. Technical Report N1522, ISO/IEC JTC 1 SC22 WG21 (2003)
Stroustrup, B., Dos Reis, G.: Concepts - syntax and composition. Technical Report N1536, ISO/IEC JTC 1 SC22 WG21 (2003)
Stroustrup, B., Dos Reis, G.: A concept design (rev. 1). Technical Report N1782=05-0042, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++ (May 2005)
Tasker, M.: The long pole gets longer. Technical Report N2893, ISO/IEC JTC 1 SC22 WG21 (June 2009)
Torgersen, M.: Virtual types are statically safe. In: FOOL 5: The 5th International Workshop on Foundations of Object-Oriented Languages (January 1998)
van der Waerden, B.L.: Algebra, vol. I. Springer (1991)
Veldhuizen, T.: Using C++ template metaprograms. C++ Report 7(4), 36–43 (1995) ISSN 1040-6042; reprinted in C++ Gems, Lippman, S. (ed.)
Wadler, P., Blott, S.: How to make ad-hoc polymorphism less ad hoc. In: POPL 1989: Proceedings of the 16th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 60–76. ACM Press, New York (1989) ISBN 0-89791-294-2
Wenzel, M.: Using Axiomatic Type Classes in Isabelle. TU München (October 2005)
Yu, D., Kennedy, A., Don, S.: Formalization of generics for the.net common language runtime. In: Proceedings of the 31st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2004, pp. 39–51. ACM, New York (2004) ISBN 1-58113-729-X, doi: http://doi.acm.org/10.1145/964001.964005
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Siek, J.G. (2012). The C++0x “Concepts” Effort. In: Gibbons, J. (eds) Generic and Indexed Programming. Lecture Notes in Computer Science, vol 7470. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-32202-0_4
Download citation
DOI: https://doi.org/10.1007/978-3-642-32202-0_4
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-32201-3
Online ISBN: 978-3-642-32202-0
eBook Packages: Computer ScienceComputer Science (R0)