dune-vtk  0.2
arguments.hh
Go to the documentation of this file.
1 #pragma once
2 
3 #include <type_traits>
4 #include <utility>
5 
6 namespace Dune
7 {
8  namespace 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 Vtk
39 } // end namespace Dune
Definition: writer.hh:13
decltype(auto) getArg(Arg0 &&arg0, Args &&... args)
Definition: arguments.hh:29