From bdea45f82b1b702b5d694cc2dcc39ab67b760bf9 Mon Sep 17 00:00:00 2001 From: lyskov-ai <277346777+lyskov-ai@users.noreply.github.com> Date: Fri, 26 Jun 2026 03:08:34 +0000 Subject: [PATCH 1/3] Drop template-id from MathVector/MathMatrix ctor/dtor names (GCC 15) GCC 15 enforces -Werror=template-id-cdtor: a class template may not name its own constructors or destructors with explicit template arguments (the injected-class-name must be used without <...>). MathVector and MathMatrix declared several ctors and their dtor as e.g. 'MathVector< T>()' and '~MathVector< T>()', which fails to compile under GCC 15 in C++20 mode and broke the debug build before it reached any core/ code. Drop the '< T>' so these match the injected-class-name form already used by the copy constructors in the same classes. No semantic change. --- source/src/numeric/MathMatrix.hh | 8 ++++---- source/src/numeric/MathVector.hh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/src/numeric/MathMatrix.hh b/source/src/numeric/MathMatrix.hh index 83e344a9b33..623208172c1 100644 --- a/source/src/numeric/MathMatrix.hh +++ b/source/src/numeric/MathMatrix.hh @@ -59,7 +59,7 @@ public: ////////////////////////////////// /// @brief default constructor - MathMatrix< T>() : + MathMatrix() : NumberRows_( 0), NumberCols_( 0), size_( 0 ), @@ -79,7 +79,7 @@ public: /// @param NUMBER_ROWS number of rows in matrix /// @param NUMBER_COLS number of cols in matrix /// @param FILL_VALUE assign every element to that value - explicit MathMatrix< T> + explicit MathMatrix ( const Size NUMBER_ROWS, const Size NUMBER_COLS, @@ -98,7 +98,7 @@ public: /// @param NUMBER_ROWS number of rows in matrix /// @param NUMBER_COLS number of cols in matrix /// @param DATA pointer to field of data - MathMatrix< T> + MathMatrix ( const Size NUMBER_ROWS, const Size NUMBER_COLS, @@ -133,7 +133,7 @@ public: } /// @brief destructor - ~MathMatrix< T>() + ~MathMatrix() { delete[] data_; } diff --git a/source/src/numeric/MathVector.hh b/source/src/numeric/MathVector.hh index 8f77d595261..57e82e27496 100644 --- a/source/src/numeric/MathVector.hh +++ b/source/src/numeric/MathVector.hh @@ -66,7 +66,7 @@ public: ////////////////////////////////// /// @brief default constructor - MathVector< T>() : + MathVector() : size_( 0), data_( nullptr ) { @@ -81,7 +81,7 @@ public: /// @brief construct from size and possible filler /// @param SIZE number fo elements in Vector /// @param FILL_VALUE assign every element to that value - explicit MathVector< T>( const Size SIZE, const T &FILL_VALUE= T( 0)) : + explicit MathVector( const Size SIZE, const T &FILL_VALUE= T( 0)) : size_( SIZE), data_( new T[ SIZE]) { @@ -91,7 +91,7 @@ public: } /// @brief construct from length and pointer to data - MathVector< T>( const Size SIZE, const T *DATA) : + MathVector( const Size SIZE, const T *DATA) : size_( SIZE), data_( new T[ SIZE]) { @@ -116,7 +116,7 @@ public: } /// @ brief destructor - ~MathVector< T>() + ~MathVector() { delete[] data_; } From 631830c677818d763d4788d0e97bb4fa1c3b4e67 Mon Sep 17 00:00:00 2001 From: lyskov-ai <277346777+lyskov-ai@users.noreply.github.com> Date: Wed, 1 Jul 2026 00:21:36 +0000 Subject: [PATCH 2/3] Drop template-id from OneDHistogram's constructor name (GCC 14/15) Same -Werror=template-id-cdtor issue as MathVector/MathMatrix: the default constructor named itself 'OneDHistogram()' instead of using the injected-class-name. This one only surfaces when something instantiates the ctor (a unit test does), so it slipped past a library-only build and is what broke CI on the previous version of this fix. --- source/src/numeric/histograms/OneDHistogram.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/src/numeric/histograms/OneDHistogram.hh b/source/src/numeric/histograms/OneDHistogram.hh index 72ddb913be3..62daea39522 100644 --- a/source/src/numeric/histograms/OneDHistogram.hh +++ b/source/src/numeric/histograms/OneDHistogram.hh @@ -38,7 +38,7 @@ class OneDHistogram { public: - OneDHistogram()= default; + OneDHistogram()= default; void insert_data(key1 key_1, platform::Size counts){ histogram_.insert(std::make_pair(key_1, counts)); From e87ead52a5b7835fafc479478fa3560cf5e5a878 Mon Sep 17 00:00:00 2001 From: lyskov-ai <277346777+lyskov-ai@users.noreply.github.com> Date: Thu, 2 Jul 2026 19:38:47 +0000 Subject: [PATCH 3/3] Beautify numeric headers with native Rosetta beautifier Running tools/python_cc_reader/beautify_changed_files_in_branch.py over the files touched by this branch restores project-standard formatting that the template-id edits had left off: member-initializer lists in MathVector/ MathMatrix are re-indented one level under their constructors (matching the copy constructors in the same classes). Incidentally normalizes pre-existing style in OneDHistogram.hh (namespace brace spacing, data-member indentation) so the beautify check passes on all files in this branch's diff. Whitespace-only; no semantic change. --- source/src/numeric/MathMatrix.hh | 24 +++++++++---------- source/src/numeric/MathVector.hh | 12 +++++----- .../src/numeric/histograms/OneDHistogram.hh | 6 ++--- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/source/src/numeric/MathMatrix.hh b/source/src/numeric/MathMatrix.hh index 623208172c1..0b66fa7274e 100644 --- a/source/src/numeric/MathMatrix.hh +++ b/source/src/numeric/MathMatrix.hh @@ -60,10 +60,10 @@ public: /// @brief default constructor MathMatrix() : - NumberRows_( 0), - NumberCols_( 0), - size_( 0 ), - data_( nullptr ) + NumberRows_( 0), + NumberCols_( 0), + size_( 0 ), + data_( nullptr ) { } @@ -85,10 +85,10 @@ public: const Size NUMBER_COLS, const T &FILL_VALUE = T( 0) ) : - NumberRows_( NUMBER_ROWS), - NumberCols_( NUMBER_COLS), - size_( NumberRows_ * NumberCols_ ), - data_( new T[ size_ ]) + NumberRows_( NUMBER_ROWS), + NumberCols_( NUMBER_COLS), + size_( NumberRows_ * NumberCols_ ), + data_( new T[ size_ ]) { // set all values to FILL_VALUE std::fill( data_, data_ + size_, FILL_VALUE); @@ -104,10 +104,10 @@ public: const Size NUMBER_COLS, const T *DATA ) : - NumberRows_( NUMBER_ROWS), - NumberCols_( NUMBER_COLS), - size_( NumberRows_ * NumberCols_ ), - data_( new T[ NumberRows_ * NumberCols_]) + NumberRows_( NUMBER_ROWS), + NumberCols_( NUMBER_COLS), + size_( NumberRows_ * NumberCols_ ), + data_( new T[ NumberRows_ * NumberCols_]) { // copy data std::copy( DATA, DATA + size_, data_); diff --git a/source/src/numeric/MathVector.hh b/source/src/numeric/MathVector.hh index 57e82e27496..97c3029add4 100644 --- a/source/src/numeric/MathVector.hh +++ b/source/src/numeric/MathVector.hh @@ -67,8 +67,8 @@ public: /// @brief default constructor MathVector() : - size_( 0), - data_( nullptr ) + size_( 0), + data_( nullptr ) { } @@ -82,8 +82,8 @@ public: /// @param SIZE number fo elements in Vector /// @param FILL_VALUE assign every element to that value explicit MathVector( const Size SIZE, const T &FILL_VALUE= T( 0)) : - size_( SIZE), - data_( new T[ SIZE]) + size_( SIZE), + data_( new T[ SIZE]) { // set all values to FILL_VALUE @@ -92,8 +92,8 @@ public: /// @brief construct from length and pointer to data MathVector( const Size SIZE, const T *DATA) : - size_( SIZE), - data_( new T[ SIZE]) + size_( SIZE), + data_( new T[ SIZE]) { std::copy( DATA, DATA + SIZE, data_); } diff --git a/source/src/numeric/histograms/OneDHistogram.hh b/source/src/numeric/histograms/OneDHistogram.hh index 62daea39522..d9e6a1f2bbc 100644 --- a/source/src/numeric/histograms/OneDHistogram.hh +++ b/source/src/numeric/histograms/OneDHistogram.hh @@ -29,8 +29,8 @@ #include #include -namespace numeric{ -namespace histograms{ +namespace numeric { +namespace histograms { template @@ -52,7 +52,7 @@ public: private: -std::map< key1, platform::Size > histogram_; + std::map< key1, platform::Size > histogram_; };