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 <mutz@kde.org>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9
10#pragma once
11
12namespace MessageViewer
13{
14template<typename T>
15struct 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-2024 The KDE developers.
Generated on Fri Dec 6 2024 11:58:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.