/usr/include/CLHEP/RefCount/ZMuseCount.icc is in libclhep-dev 2.1.4.1-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | // ----------------------------------------------------------------------
//
// ZMuseCount.icc - utility class for use in reference-counting
//
//
// History:
// 19-Sep-1997 WEB Design stolen, and code adapted, from pp 70-73 of
// Koenig & Moo: "Ruminations on C++" (1996)
// 23-Sep-1997 WEB Furnished overlooked body of copy constructor.
//
// ----------------------------------------------------------------------
ZMuseCount::ZMuseCount()
: p( new int(1) )
{
// DEBUG if ( p == 0 )
// DEBUG std::cerr << "ZMuseCount memory allocation failure!" << std::endl;
}
ZMuseCount::ZMuseCount( const ZMuseCount & u )
: p( u.p )
{
++*p;
}
ZMuseCount::~ZMuseCount() {
if ( --*p == 0 )
delete p;
}
bool ZMuseCount::only() {
return *p == 1;
}
|