Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
impl_utils.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
19#include <fmt/core.h>
20#include <fmt/format.h>
21#include <fmt/printf.h>
22#include <fmt/ranges.h>
23#include <string>
24
25namespace shamalgs {
26
27 struct impl_param {
28 std::string impl_name;
29 std::string params;
30 };
31
32} // namespace shamalgs
33
34template<>
35struct fmt::formatter<shamalgs::impl_param> {
36
37 template<typename ParseContext>
38 constexpr auto parse(ParseContext &ctx) {
39 return ctx.begin();
40 }
41
42 template<typename FormatContext>
43 auto format(shamalgs::impl_param c, FormatContext &ctx) const {
44 return fmt::format_to(ctx.out(), "(impl_name = {}, params = {})", c.impl_name, c.params);
45 }
46};
namespace to contain everything implemented by shamalgs
Definition algorithm.hpp:21