ConceptC++ Publications


[Publications][Active Proposals][Background Documents][Superceded Proposals][Errata]

Publications

  • Peter Gottschling. Fundamental Algebraic Concepts in Concept-Enabled C++. Technical Report TR638. Indiana University. October, 2006.
  • Douglas Gregor, Jaakko Järvi, Jeremy Siek, Bjarne Stroustrup, Gabriel Dos Reis, and Andrew Lumsdaine. Concepts: Linguistic Support for Generic Programming in C++. In Proceedings of the 2006 ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications (OOPSLA '06), pages 291--310, October 2006. ACM Press.
  • Jaakko Järvi, Douglas Gregor, Jeremiah Willcock, Andrew Lumsdaine, and Jeremy Siek. Algorithm specialization in generic programming: Challenges of constrained generics in C++. In PLDI '06: Proceedings of the ACM SIGPLAN 2006 conference on Programming language design and implementation, pages 272-282, New York, NY, USA, June 2006. ACM Press.
  • Gabriel Dos Reis and Bjarne Stroustrup: Specifying C++ concepts. In POPL '06: Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages, pages 295-308, New York, NY, USA, January 2006. ACM Press.

Active Proposals and Technical Reports

Background Documents

  • Douglas Gregor. A Tour of the Concepts Wording. Technical report N2399=07-0259, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, September 2007.
  • Douglas Gregor and Jeremy Siek. Implementing concepts. Technical Report N1848=05-0108, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, August 2005. [Errata]
  • Douglas Gregor and Jeremy Siek. Explicit model definitions are necessary. Technical Report N1798=050058, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, May 2005.

Superceded Proposals and Technical Reports

  • Douglas Gregor and Bjarne Stroustrup. Proposed wording for concepts (Revision 2). Technical report N2398=07-0258, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, September 2007.
  • Douglas Gregor and Bjarne Stroustrup. Proposed wording for concepts (Revision 1). Technical report N2307=07-0167, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, June 2007.
  • Douglas Gregor and Bjarne Stroustrup. Proposed wording for concepts. Technical report N2193=07-0053, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, March 2007.
  • Douglas Gregor and Jeremiah Willcock and Andrew Lumsdaine. Concepts for the C++0x Standard Library: Utilities (Revision 1). Technical Report N2082=06-0152, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, October 2006.
  • Douglas Gregor and Jeremiah Willcock and Andrew Lumsdaine. Concepts for the C++0x Standard Library: Iterators (Revision 1). Technical Report N2083=06-0153, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, October 2006.
  • Douglas Gregor and Bjarne Stroustrup. Concepts (Revision 1). Technical Report N2081=06-0151, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, October, 2006.
  • Douglas Gregor. Conceptualizing the Range-Based for Loop. Technical Report N2049=06-0119, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, June 2006. [Errata]
  • Douglas Gregor and Jeremiah Willcock and Andrew Lumsdaine. Concepts for the C++0x Standard Library: Utilities. Technical Report N2038=06-0108, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, June 2006.
  • Douglas Gregor and Jeremiah Willcock and Andrew Lumsdaine. Concepts for the C++0x Standard Library: Iterators. Technical Report N2039=06-0109, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, June 2006.
  • Douglas Gregor and Jeremiah Willcock and Andrew Lumsdaine. Concepts for the C++0x Standard Library: Algorithms. Technical Report N2040=06-0110, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, June 2006. [Errata]
  • Douglas Gregor and Bjarne Stroustrup. Concepts. Technical Report N2042=06-0112, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, June 2006. [Errata]
  • Douglas Gregor, Jeremy Siek, Jeremiah Willcock, Jaakko Järvi, Ronald Garcia, and Andrew Lumsdaine. Concepts for C++0x (revision 1). Technical Report N1849=05-0109, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, August 2005. [Errata]
  • Bjarne Stroustrup and Gabriel Dos Reis. A concept design (rev. 1). Technical Report N1782=05-0042, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, May 2005.
  • Jeremy Siek, Douglas Gregor, Ronald Garcia, Jeremiah Willcock, Jaakko Järvi, and Andrew Lumsdaine. Concepts for C++0x. Technical Report N1758=05-0018, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, January 2005. [Errata]
  • Bjarne Stroustrup. 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.
  • Bjarne Stroustrup and Gabriel Dos Reis. Concepts - design choices for template argument checking. Technical Report N1522=03-0105, ISO/IEC JTC 1, Informa- tion Technology, Subcommittee SC 22, Programming Language C++, October 2003.
  • Bjarne Stroustrup and Gabriel Dos Reis. Concepts - syntax and composition. Technical Report N1536=03-0119, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, October 2003.

Errata

N2049: Conceptualizing the Range-Based for Loop

  • Second page: Replace "model templates" with "concept map templates".

N2042: Concepts

  • Section 2: The examples provided using min(), but the text refers to sum(). Change all occurrences of sum to min.
  • Section 2.1.1, InputIterator concept: The copy assignment operator= and swap should be replaced with:
      Iter& operator=(Iter&, const Iter&);   // copy assignment
      void swap(Iter&, Iter&);               // swap
      
  • Section 2.1.3, bottom of page 9: The phrase "written Iter::value (no typename) required!)" should be "written Iter::value_type (no typename) required!)".
  • Section 2.2, second paragraph: Replace "this concept states that char*s are concept_maps" with "this concept states that char*s are InputIterators."
  • Section 3.2.2, paragraph 3: The second signature should be T::operator U*() const;
  • Section 3.2.2, paragraph 7: The example for default implementations should use the default keyword, e.g.,
    concept EqualityComparable {
      bool operator==(T, T);
      default bool operator!=(T x, T y) { return !(x == y); }
    };
      
  • Section 3.2.5, first paragraph: replace "must be are" with "must be".
  • Section 3.3, student_record example: The EqualityComparable concept map's operator== is missing a close brace and the function parameter types are missing underscores. The concept map should read:
    concept_map EqualityComparable {
      bool operator==(const student_record& a, const student_record& b)
      { return a.id == b.id; }
    }; 
  • Section 3.3.2, paragraph 3: The concept map for ForwardIterator should refer to Allocator, and the rebind member needs a public access specifier. The concept map should read:
    template
    concept_map Allocator > {
      template
        class rebind {
        public:
          typedef my_allocator type;
        };
    };
      
  • Section 3.4, first paragraph: Replace "nearly-perflect" with "nearly-perfect".
  • Section 3.4.1, paragraph 5: The last definition of cos should read:
    template where Regular && !(!Integral && !Regular)
    T cos(T x) { /* error: redefinition of cos */ }
      
  • Section 3.4.2, Alternative: In the BinaryOperation example, the "typeaname" should be "typename".
  • Section 3.4.3, paragraph 5: This paragraph correctly states that type-checking using the BidirectionalIterator version of advance (#2), but fails to note that the RandomAccessIterator version (#3) will be considered again at instantiation-time. discussed in 3.4.4p2.
  • Section 3.4.7, paragraph 4: The example should read:
    template
      where Convertible
      concept_map ForwardIterator late_check { ... };
      
  • Section 3.6.1, example: The assignment operator is missing a final return *this;
  • Section 3.6.1, first paragraph: Change "declarated" to "declared".

N2041: Concepts for the C++0x Standard Library: Numerics

  • 26.4.1: The first accumulate signature should use Iter::reference instead of Iter::value_type:
    template  T>
      where Assignable
      T accumulate(Iter first, Iter last, T init);

    This error also occurs in the synopsis.

N2040: Concepts for the C++0x Standard Library: Algorithms

  • 25.1.5: The second adjacent_find overload should read:
    template Pred>
      Iter adjacent_find(Iter first, Iter last, Pred pred);
  • 25.2.4: The replace_copy signatures should use OutputIterator instead of OutputIterator. Replace the signatures with (in your copy):
    template OutIter, class T>
      where Assignable && EqualityComparable
      OutIter replace_copy(InIter first, InIter last, 
                           OutIter result, 
                           const T& old_value , const T& new_value);
    template OutIter,
    Predicate Pred, class T>
      where Assignable
      OutIter replace_copy_if(InIter first, InIter last, 
                              OutIter result, 
                              Pred pred, const T& new_value);
  • 25.3.3.1: The first lower_bound signature should use Iter::reference, not Iter::value_type:
    template
      where LessThanComparable
      Iter lower_bound(Iter first, Iter last,
                       const T& value);

N1849: Concepts for C++0x (revision 1)

  • Section 4.1, grammar: In the template-declaration production, replace template-argument-list with template-parameter-list, to get:
    template-declaration
    template < template-parameter-list > structopt concept identifier concept-definitionopt ;
      
  • Section 4.2, grammar: In the template-declaration production, replace template-argument-listopt with template-parameter-listopt, to get:
    template-declaration
    template < template-parameter-listopt > where-clauseopt concept model-id model-bodyopt ;
      
  • Section 4.2.4, example: The text model should be replaced with template<> concept, to properly declare a model.
  • Section 4.1.3, grammar: Both typenames should be typeset in a monospaced font to indicate that they are keywords.
  • Section 4.3, grammar: id-expression should be typeset in italics, to indicate that it is a nonterminal.
  • Section 4.4.1, for_each example: For ConceptGCC version ic2 and newer, the error message "error: 'F' has no copy constructor" does not appear and the footnote on page 27 does not apply.
  • Section 4.4.2 (Non-dependent names), first example: The requirement on the type parameter Iter for lower_bound should be ForwardIterator, not BidirectionalIterator.
  • Section 4.4.2 (Lookup in uninstantiated templates), all examples: The class template foo should be declared as a struct, and bar() should be declared static.
  • Section 4.4.2 (Lookup in uninstantiated templates), last example: g() should have an empty where {} clause.
  • Section 4.5.5, last example: The function equiv should use operators other than <, e.g.,
      bool equiv(X x, X y) { 
        return (x >= y) && (x <= y); // Ok! 
      }
  • Section A.2, RandomAccessIterator: This concept should probably implement the proposed resolution to Library issue 299, to avoid problems with references to temporaries. To do so, replace the pseudo-signature for operator[] with:
      typename subscript_result = reference;
      where Convertible;
      subscript_result operator[](X, difference_type);

    Then, add the following to the concept MutableRandomAccessIterator:

      where Assignable;
  • Section A.5, copy: The first argument should be named first, not first1.
  • Section A.5, the first transform: reference should be fully-qualified as InputIterator::reference, to eliminate an ambiguity with the OutputIterator's associated type reference.
  • Section A.5, the second transform: Func in the where clause should be replaced with BinOp.

N1848: Implementing Concepts

  • Section 2.2.4, InputIterator concept example: The require should be replaced with where.
  • Section 3.2, end of the code example: The line containing struct int {}; should be removed.

N1758: Concepts for C++0x

  • Section B.6: This section describes the Curiously Recurring Template Pattern but mistakenly refers to it as the Barton & Nackman trick. The Barton & Nackman trick actually refers to defining friend functions within a template that will be found via argument-dependent lookup.