LCOV - code coverage report
Current view: top level - issm-precice - raii.hpp (source / functions) Hit Total Coverage
Test: issm-precice-test-coverage.info Lines: 2 2 100.0 %
Date: 2025-07-12 23:40:24 Functions: 2 4 50.0 %

          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             : namespace ipc
       8             : {
       9             : /**
      10             :  * Run a user-specified function when destroyed.
      11             :  */
      12             : template<class F> struct ScopeExit
      13             : {
      14             :     F m_f;
      15           1 :     ScopeExit(F f) : m_f(f) { }
      16           1 :     ~ScopeExit() { m_f(); }
      17             : };
      18             : } // namespace ipc

Generated by: LCOV version 1.14