| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // Copyright (C) 2026 Tiago V. L. Amorim (@tiagovla) | ||
| 2 | // | ||
| 3 | // This file is part of oiseau (https://github.com/tiagovla/oiseau) | ||
| 4 | // | ||
| 5 | // SPDX-License-Identifier: GPL-3.0-or-later | ||
| 6 | |||
| 7 | #pragma once | ||
| 8 | |||
| 9 | namespace oiseau::time::detail { | ||
| 10 | |||
| 11 | template <typename System, typename State> | ||
| 12 | 3510 | auto evaluate_rhs(System& system, double time, const State& state) { | |
| 13 | if constexpr (requires { system.rhs(time, state); }) { | ||
| 14 | 28 | return system.rhs(time, state); | |
| 15 | } else { | ||
| 16 | 3482 | return system.rhs(state); | |
| 17 | } | ||
| 18 | } | ||
| 19 | |||
| 20 | } // namespace oiseau::time::detail | ||
| 21 |