Skip to content

Commit b58458d

Browse files
committed
Fixed template copy constructors
1 parent 40ebcac commit b58458d

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

LibraryCPPTemplate/array.h

+2-4
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@ template <typename Data> class Array
1010
}
1111

1212
// copy constructor
13-
template <typename T>
14-
Array(const Array<T> &a)
13+
Array(const Array &a)
1514
{
1615
}
1716

1817
// assignment operator
19-
template <typename T>
20-
Array &operator=(const Array<T> &a)
18+
Array &operator=(const Array &a)
2119
{
2220
return *this;
2321
}

LibraryCPPTemplate/list.h

+2-4
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@ template <typename Data> class List
2020
}
2121

2222
// copy constructor
23-
template <typename T>
24-
List(const List<T> &a)
23+
List(const List &a)
2524
{
2625
}
2726

2827
// assignment operator
29-
template <typename T>
30-
List &operator=(const List<T> &a)
28+
List &operator=(const List &a)
3129
{
3230
return *this;
3331
}

LibraryCPPTemplate/vector.h

+2-4
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ template <typename Data> class Vector
1212
}
1313

1414
// copy constructor
15-
template <typename T>
16-
Vector(const Vector<T> &a)
15+
Vector(const Vector &a)
1716
{
1817
}
1918

2019
// assignment operator
21-
template <typename T>
22-
Vector &operator=(const Vector<T> &a)
20+
Vector &operator=(const Vector &a)
2321
{
2422
return *this;
2523
}

0 commit comments

Comments
 (0)