GCC Code Coverage Report


Directory: cvmfs/
File: cvmfs/util/single_copy.h
Date: 2024-04-28 02:33:07
Exec Total Coverage
Lines: 1 1 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 /**
2 * This file is part of the CernVM File System.
3 */
4
5 #ifndef CVMFS_UTIL_SINGLE_COPY_H_
6 #define CVMFS_UTIL_SINGLE_COPY_H_
7
8 #ifdef CVMFS_NAMESPACE_GUARD
9 namespace CVMFS_NAMESPACE_GUARD {
10 #endif
11
12
13 /**
14 * Generic base class to mark an inheriting class as 'non-copyable'
15 */
16 class SingleCopy {
17 protected:
18 // Prevent SingleCopy from being instantiated on its own
19 164876147 SingleCopy() {}
20
21 private:
22 // Provoke a linker error by not implementing copy constructor and
23 // assignment operator.
24 SingleCopy(const SingleCopy &other);
25 SingleCopy& operator=(const SingleCopy &rhs);
26 };
27
28
29 #ifdef CVMFS_NAMESPACE_GUARD
30 } // namespace CVMFS_NAMESPACE_GUARD
31 #endif
32
33 #endif // CVMFS_UTIL_SINGLE_COPY_H_
34