dune-vtk 2.12
Loading...
Searching...
No Matches
arguments.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file AUTHORS.md
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception OR LGPL-3.0-or-later
3#pragma once
4
5#include <type_traits>
6#include <utility>
7
8namespace Dune::Vtk
9{
12
28 template <class... T, class Arg0, class... Args>
29 decltype(auto) getArg(Arg0&& arg0, Args&&... args)
30 {
31 using A = std::decay_t<Arg0>;
32 if constexpr ((std::is_same_v<A,T> ||...))
33 return std::forward<Arg0>(arg0);
34 else
35 return getArg<T...>(std::forward<Args>(args)...);
36 }
37
38} // end namespace Dune::Vtk
Definition datacollector.hh:19
decltype(auto) getArg(Arg0 &&arg0, Args &&... args)
Definition arguments.hh:29
Implementation of DataCollector for cells, with continuous data.
Definition celltypedatacollector.hh:20