Visual Computing Library
Loading...
Searching...
No Matches
vcl::HasEdges Concept Reference

HasEdges concepts is satisfied when at least one of its template types is (or inherits from) a vcl::mesh::EdgeContainer. It can be used both to check if a Mesh has edges, or if in a list of types there is a EdgeContainer. More...

#include <vclib/concepts/mesh/containers/edge_container.h>

Concept definition

template<typename... Args>
HasEdges concepts is satisfied when at least one of its template types is (or inherits from) a vcl::m...
Definition edge_container.h:131
The HasEdgeContainer concept is satisfied only if a container class provides the types and member fun...
Definition edge_container.h:44

Detailed Description

HasEdges concepts is satisfied when at least one of its template types is (or inherits from) a vcl::mesh::EdgeContainer. It can be used both to check if a Mesh has edges, or if in a list of types there is a EdgeContainer.

In the following example, a MyMesh type can be instantiated only if one of its template Args is a EdgeContainer:

template <typename... Args> requires HasEdges<Args...>
class MyMesh {
// ...
};
// ...
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43

To check if a type has (inherits from) EdgeContainer:

if constexpr (vcl::HasEdges<MyMeshType>) {
// ...
}
Note
This concept does not check if a Mesh is a valid EdgeMesh. To do that, use the vcl::EdgeMeshConcept.