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>
15 struct DeleteAndSetToZero {
16  void operator()(const T *&t)
17  {
18  delete t;
19  t = nullptr;
20  }
21 };
22 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Wed May 25 2022 03:55:40 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.