File: summary.yo

package info (click to toggle)
c%2B%2B-annotations 8.2.0-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 11,804 kB
  • ctags: 2,845
  • sloc: cpp: 15,418; makefile: 2,473; ansic: 165; perl: 90; sh: 29
file content (34 lines) | stat: -rw-r--r-- 1,397 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
In this section the basic syntactic constructions for declaring templates
are summarized. When em(defining) templates, the terminating
semicolon should be replaced by a function body.

Not every template declaration may be converted into a template definition. If
a definition may be provided it is explicitly mentioned.
    itemization(
    it() A plain template declaration (a definition may be provided):
        verb(
    template <typename Type1, typename Type2>
    void function(Type1 const &t1, Type2 const &t2);
        )
    it() A template instantiation declaration (no definition may be provided):
        verb(
    template
    void function<int, double>(int const &t1, double const &t2);
        )
    it() A template using explicit types (no definition may be provided):
        verb(
    void (*fp)(double, double) = function<double, double>;
    void (*fp)(int, int) = function<int, int>;
        )
    it() A template explicit specialization (a definition may be provided):
        verb(
    template <>
    void function<char *, char *>(char *const &t1, char *const &t2);
        )
    it() A template declaration declaring friend function templates within
        hi(class template: friend function template) class templates (covered
in section ref(TEMPFRIENDS), no definition may be provided):
        verb(
    friend void function<Type1, Type2>(parameters);
        )
    )