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-2023 The KDE developers.
Generated on Wed Mar 22 2023 04:07:15 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.