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
Be sure to initialize the size before use.
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.other
/
new3.C
1
typedef __SIZE_TYPE__ size_t;
2
3
template <class T>
4
struct A
5
{
6
int size;
7
A ()
8
{
9
size = 20;
10
T *p;
11
p = new T[size];
12
int foo;
13
foo = 5 * size;
14
};
15
};
16
17
struct B
18
{
19
virtual ~B() { }
20
void operator delete [] (void *ptr, size_t size) { }
21
};
22
23
int main ()
24
{
25
A<B> *p = new A<B>;
26
}