Skip to content

Commit

Permalink
Fix FTBFS of NAMD when using GCC 13.1 with --std=c++20
Browse files Browse the repository at this point in the history
The following use of class template fails to build when using GCC 13.1
with --std=c++20:
```
template <typename T>
class Foo {
public:
  Foo<T>() {}
};
```
The extra "<T>" in the constructor should be removed for compilation.
NAMD uses `CkHashtableAdaptorT` so I need to remove the redundant `<T>`
to make it compiled.
  • Loading branch information
HanatoK authored and matthiasdiener committed May 24, 2023
1 parent 621adc4 commit bb27969
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/ckhashtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,9 @@ as a fast key like this:
template <class T> class CkHashtableAdaptorT {
T val;
public:
CkHashtableAdaptorT<T>(const T &v):val(v) {}
CkHashtableAdaptorT(const T &v):val(v) {}
/**added to allow pup to do Key k while unPacking*/
CkHashtableAdaptorT<T>(){}
CkHashtableAdaptorT(){}
operator T & () {return val;}
operator const T & () const {return val;}
inline CkHashCode hash(void) const
Expand Down

0 comments on commit bb27969

Please sign in to comment.