I recently updated my gcc compiler on Ubuntu to the 12.2.0 version. Now, the compilation fails with these errors:
In file included from source/base/DetectorConstruction.cc:9:
source/base/DetectorConstruction.h:33:22: error: 'std::unique_ptr' has not been declared
...
source/base/DetectorConstruction.h:13:1: note: 'std::unique_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
12 | #include <G4VUserDetectorConstruction.hh>
+++ |+#include <memory>
13 |
and
In file included from source/base/PrimaryGeneration.cc:10:
source/base/PrimaryGeneration.h:32:23: error: 'std::unique_ptr' has not been declared
...
source/base/PrimaryGeneration.h:15:1: note: 'std::unique_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
14 | #include <globals.hh>
+++ |+#include <memory>
Adding the #include <memory> fixes indeed the issue. Before opening a PR it would be good to have someone verify this independently.
I recently updated my gcc compiler on Ubuntu to the 12.2.0 version. Now, the compilation fails with these errors:
and
Adding the
#include <memory>
fixes indeed the issue. Before opening a PR it would be good to have someone verify this independently.