Skip to content

Commit c4a10f9

Browse files
kiilerixpeternewman
authored andcommitted
Fix error: template-id not allowed for constructor in C++20
Building ola fails on Fedora with GCC-14: In file included from ./include/ola/Clock.h:32: ./include/ola/base/Macro.h:45:11: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor] 45 | TypeName(const TypeName&); \ | ^ ./include/ola/thread/FuturePrivate.h:92:3: note: in expansion of macro 'DISALLOW_COPY_AND_ASSIGN' 92 | DISALLOW_COPY_AND_ASSIGN(FutureImpl<T>); | ^~~~~~~~~~~~~~~~~~~~~~~~ ./include/ola/base/Macro.h:45:11: note: remove the '< >' 45 | TypeName(const TypeName&); \ | ^ When a class already is templatified, the templification can't be repeated on contained methods. (cherry picked from commit d9b9c78)
1 parent 4541ce9 commit c4a10f9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/ola/thread/FuturePrivate.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class FutureImpl {
8989
bool m_is_set;
9090
T m_value;
9191

92-
DISALLOW_COPY_AND_ASSIGN(FutureImpl<T>);
92+
DISALLOW_COPY_AND_ASSIGN(FutureImpl);
9393
};
9494

9595
/**
@@ -152,7 +152,7 @@ class FutureImpl<void> {
152152
unsigned int m_ref_count;
153153
bool m_is_set;
154154

155-
DISALLOW_COPY_AND_ASSIGN(FutureImpl<void>);
155+
DISALLOW_COPY_AND_ASSIGN(FutureImpl);
156156
};
157157

158158
} // namespace thread

plugins/usbdmx/WidgetFactory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class BaseWidgetFactory : public WidgetFactory {
172172
private:
173173
const std::string m_name;
174174

175-
DISALLOW_COPY_AND_ASSIGN(BaseWidgetFactory<WidgetType>);
175+
DISALLOW_COPY_AND_ASSIGN(BaseWidgetFactory);
176176
};
177177

178178
template <typename WidgetType>

0 commit comments

Comments
 (0)