ATLAS Offline Software
Loading...
Searching...
No Matches
SurfaceUniquePtrT.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
3/*
4 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
5*/
6
7// $Id$
14
15
16#ifndef TRKEVENTPRIMITIVES_SURFACEUNIQUEPTRT_H
17#define TRKEVENTPRIMITIVES_SURFACEUNIQUEPTRT_H
18#include <memory>
19
20namespace Trk {
21
22template <class S>
24{
25public:
26 SurfaceDeleter() = default;
27 template <class U>
29 void operator() (const S* p) {
30 if (p && p->isFree()) { delete p; }
31 }
32};
33
34template <class S>
35using SurfaceUniquePtrT = std::unique_ptr<S, SurfaceDeleter<S> >;
36
37} // namespace Trk
38
39#endif
SurfaceDeleter()=default
SurfaceDeleter(const SurfaceDeleter< U > &)
void operator()(const S *p)
Ensure that the ATLAS eigen extensions are properly loaded.
std::unique_ptr< S, SurfaceDeleter< S > > SurfaceUniquePtrT