Skip to content

Commit 8ca585e

Browse files
committed
libitm: small update for C++20
C++20 DR 2237 disallows simple-template-id in cdtors, so you can't write template<typename T> struct S { S<T>(); // should be S(); }; This hasn't been a problem until now but I'm adding a warning about it to -Wc++20-compat which libitm apparently uses. libitm/ChangeLog: * containers.h (vector): Remove the template-id in constructors.
1 parent 23f1b49 commit 8ca585e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libitm/containers.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class vector
4848
static const size_t default_resize_min = 32;
4949

5050
// Don't try to copy this vector.
51-
vector<T, alloc_separate_cl>(const vector<T, alloc_separate_cl>& x);
51+
vector(const vector<T, alloc_separate_cl>& x);
5252

5353
public:
5454
typedef T datatype;
@@ -59,7 +59,7 @@ class vector
5959
T& operator[] (size_t pos) { return entries[pos]; }
6060
const T& operator[] (size_t pos) const { return entries[pos]; }
6161

62-
vector<T, alloc_separate_cl>(size_t initial_size = default_initial_capacity)
62+
vector(size_t initial_size = default_initial_capacity)
6363
: m_capacity(initial_size),
6464
m_size(0)
6565
{
@@ -68,7 +68,7 @@ class vector
6868
else
6969
entries = 0;
7070
}
71-
~vector<T, alloc_separate_cl>() { if (m_capacity) free(entries); }
71+
~vector() { if (m_capacity) free(entries); }
7272

7373
void resize(size_t additional_capacity)
7474
{

0 commit comments

Comments
 (0)