OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.pt
/
memtemp69.C
1
struct S
2
{
3
template <class T>
4
void f(T (&i)[7])
5
{}
6
7
void g()
8
{
9
int i[] = {1, 2, 3, 4, 5, 6, 7};
10
f(i);
11
int j[7];
12
f(j);
13
}
14
};
15
16
struct foo {
17
template <typename T, int N>
18
static T* array_end(T(&array)[N]) { return &array[N]; }
19
};
20
21
struct X
22
{
23
template <class T1>
24
void f(const T1&) {}
25
};
26
27
int main(int ac, char* av[]) {
28
S s;
29
s.g();
30
int i[] = {1,2,3,4,5};
31
int* e = foo::array_end(i);
32
X x;
33
x.f("hello");
34
}
35