From 5322b3ebb4c65e1ddfebc5ea4fab70fe399812c1 Mon Sep 17 00:00:00 2001 From: AliceMazzoleni99 Date: Thu, 1 Oct 2026 12:15:50 +0200 Subject: [PATCH] Fix/matterhorn compilation on clang (#1584) * dont use this * moved explicit instantiation after definiting templated functions --- .../matterhornServer/src/BaseMatterhornServerImpl.hpp | 4 +++- .../slsDetectorServer_cpp/src/DetectorServerImpl.cpp | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/slsDetectorServers/matterhornServer/src/BaseMatterhornServerImpl.hpp b/slsDetectorServers/matterhornServer/src/BaseMatterhornServerImpl.hpp index 9d0e45d22..8131d7658 100644 --- a/slsDetectorServers/matterhornServer/src/BaseMatterhornServerImpl.hpp +++ b/slsDetectorServers/matterhornServer/src/BaseMatterhornServerImpl.hpp @@ -21,6 +21,8 @@ class BaseMatterhornServerImpl : public DetectorServerImpl< is_stop_server::value> { public: + using BaseServerImpl = + DetectorServerImpl::value>; BaseMatterhornServerImpl(); ~BaseMatterhornServerImpl() = default; @@ -93,7 +95,7 @@ void BaseMatterhornServerImpl::setupDetector() { // TODO: extend try { // stop server does not talk to the board - if constexpr (!this->stop_server) { + if constexpr (!BaseServerImpl::stop_server) { set_num_frames(1); set_num_triggers(1); set_counter_mask(0xF); // enable counter all counters by default diff --git a/slsDetectorServers/slsDetectorServer_cpp/src/DetectorServerImpl.cpp b/slsDetectorServers/slsDetectorServer_cpp/src/DetectorServerImpl.cpp index 959fa2080..abc47935f 100644 --- a/slsDetectorServers/slsDetectorServer_cpp/src/DetectorServerImpl.cpp +++ b/slsDetectorServers/slsDetectorServer_cpp/src/DetectorServerImpl.cpp @@ -5,9 +5,6 @@ namespace sls { -template class DetectorServerImpl; // forward declare -template class DetectorServerImpl; // forward declare - template DetectorServerImpl::DetectorServerImpl() { udpDetails[0].srcport = DEFAULT_UDP_SRC_PORTNO; @@ -114,4 +111,9 @@ DetectorServerImpl::get_detector_setup_status() const { return detectorSetupStatus; } +template class DetectorServerImpl; // explicit instantiation for stop + // server +template class DetectorServerImpl; // explicit instantiation for control + // server + } // namespace sls \ No newline at end of file