| LCOV - code coverage report | ||||||||||||||||||||||
|
||||||||||||||||||||||
Line data Source code 1 : // SPDX-FileCopyrightText: 2024 Daniel Abele <daniel.abele@dlr.de> 2 : // 3 : // SPDX-License-Identifier: BSD-3-Clause 4 : 5 : #pragma once 6 : 7 : #include "issm-precice/config.hpp" 8 : 9 : namespace ipc 10 : { 11 : /** 12 : * Run a user-specified function when destroyed. 13 : */ 14 : template<class F> struct ScopeExit 15 : { 16 : F m_f; 17 1 : ScopeExit(F f) : m_f(f) { } 18 1 : ~ScopeExit() { m_f(); } 19 : }; 20 : } // namespace ipc |
| Generated by: LCOV version 2.0-1 |