1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2022 Xaver Hugl <xaver.hugl@gmail.com>
4
5 SPDX-License-Identifier: LGPL-2.1-or-later
6*/
7#pragma once
8#include <memory>
9
10struct CDeleter {
11 template<typename T>
12 void operator()(T *ptr)
13 {
14 free(ptr);
15 }
16};
17template<typename T>
18using UniqueCPointer = std::unique_ptr<T, CDeleter>;
19

source code of kwindowsystem/src/cptr_p.h