Skip to content

C++20 warns about duplicate template-id in constructors/destructors #353

@dchassin

Description

@dchassin

Problem description

The following is output repeatedly by builds on RedHat 10:

./source/property.h:98:29: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
   98 |         inline charbuf<size>(void) { erase(); };
      |                             ^
./source/property.h:98:29: note: remove the '< >'
./source/property.h:101:29: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
  101 |         inline charbuf<size>(const char *s) { copy_from(s); };
      |                             ^
./source/property.h:101:29: note: remove the '< >'
./source/property.h:104:16: warning: template-id not allowed for destructor in C++20 [-Wtemplate-id-cdtor]
  104 |         inline ~charbuf<size>(void) {};
      |                ^
./source/property.h:104:16: note: remove the '< >'

Metadata

Metadata

Assignees

Labels

buildBuild issue

Type

No type

Projects

Status

Issues

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions