File: summary.yo

package info (click to toggle)
c%2B%2B-annotations 13.02.02-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,576 kB
  • sloc: cpp: 25,297; makefile: 1,523; ansic: 165; sh: 126; perl: 90; fortran: 27
file content (29 lines) | stat: -rw-r--r-- 1,276 bytes parent folder | download | duplicates (4)
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
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);)

)