Messagelib

stl_util.h
1 /* -*- c++ -*-
2  stl_util.h
3 
4  This file is part of KMail, the KDE mail client.
5  SPDX-FileCopyrightText: 2004 Marc Mutz <[email protected]>
6 
7  SPDX-License-Identifier: GPL-2.0-or-later
8 */
9 
10 #pragma once
11 
12 namespace MessageViewer
13 {
14 template<typename T> struct DeleteAndSetToZero {
15  void operator()(const T *&t)
16  {
17  delete t;
18  t = nullptr;
19  }
20 };
21 }
22 
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Nov 26 2021 23:16:43 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.