Skip to content

Commit

Permalink
lib/iostream: Remove redundant template parameters (OSGeo#4586)
Browse files Browse the repository at this point in the history
In C++20, repeating template parameter names with the name of the class is no longer allowed as it is redundant (https://cplusplus.github.io/CWG/issues/2237.html). The new code is valid also in C++17, but the old code is not accepted in C++20.
  • Loading branch information
wenzeslaus authored Oct 26, 2024
1 parent 652a2f8 commit 5af22b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions include/grass/iostream/replacementHeap.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ class ReplacementHeap {

public:
// allocate array mergeHeap and the runs in runList
ReplacementHeap<T, Compare>(size_t arity, queue<char *> *runList);
ReplacementHeap(size_t arity, queue<char *> *runList);

// delete array mergeHeap
~ReplacementHeap<T, Compare>();
~ReplacementHeap();

// is heap empty?
int empty() const { return (size == 0); }
Expand Down Expand Up @@ -159,7 +159,7 @@ ReplacementHeap<T, Compare>::ReplacementHeap(size_t g_arity,

/*****************************************************************/
template <class T, class Compare>
ReplacementHeap<T, Compare>::~ReplacementHeap<T, Compare>()
ReplacementHeap<T, Compare>::~ReplacementHeap()
{

if (!empty()) {
Expand Down
6 changes: 3 additions & 3 deletions include/grass/iostream/replacementHeapBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ class ReplacementHeapBlock {

public:
// allocate array mergeHeap, where the streams are stored in runList
ReplacementHeapBlock<T, Compare>(queue<MEM_STREAM<T> *> *runList);
ReplacementHeapBlock(queue<MEM_STREAM<T> *> *runList);

// delete array mergeHeap
~ReplacementHeapBlock<T, Compare>();
~ReplacementHeapBlock();

// is heap empty?
int empty() const { return (size == 0); }
Expand Down Expand Up @@ -161,7 +161,7 @@ ReplacementHeapBlock<T, Compare>::ReplacementHeapBlock(

/*****************************************************************/
template <class T, class Compare>
ReplacementHeapBlock<T, Compare>::~ReplacementHeapBlock<T, Compare>()
ReplacementHeapBlock<T, Compare>::~ReplacementHeapBlock()
{

if (!empty()) {
Expand Down

0 comments on commit 5af22b2

Please sign in to comment.