dune-vtk 2.12
Loading...
Searching...
No Matches
gridcreators/common.hh
Go to the documentation of this file.
1#pragma once
2
3#include <type_traits>
4
5namespace Dune::Vtk
6{
7 template <class Factory, class... Args>
8 using HasInsertVertex = decltype( std::declval<Factory>().insertVertex(std::declval<Args>()...) );
9
10 namespace Impl
11 {
12 template <class GF, class = void>
13 struct VertexIdType { using type = unsigned int; };
14
15 template <class GF>
16 struct VertexIdType<GF, typename GF::VertexId> { using type = typename GF::VertexId; };
17 }
18
19 template <class GF>
20 using VertexId_t = typename Impl::VertexIdType<GF>::type;
21
22} // end namespace Dune::Vtk
Definition writer.hh:16
typename Impl::VertexIdType< GF >::type VertexId_t
Definition gridcreators/common.hh:20
decltype(std::declval< Factory >().insertVertex(std::declval< Args >()...)) HasInsertVertex
Definition gridcreators/common.hh:8