Generated from: MR::VertId
Aliases: Vector_VertId_Id_EdgeTag_reference, Vector_VertId_VertId_const_reference, Vector_VertId_Id_EdgeTag_const_reference, Vector_VertId_VertId_value_type, Vector_VertId_VertId_reference, TypedBitSet_VertId_IndexType, Vector_VertId_Id_EdgeTag_value_type
stores index of some element, it is made as template class to avoid mixing faces, edges and vertices
| None mrmeshpy.VertId.__init__ |
( |
| self, |
|
|
int | i ) |
Allow constructing from `int` and other integral types.
This constructor is written like this instead of a plain `Id(int)`, because we also wish to disable construction
from other unrelated `Id<U>` specializations, which themselves have implicit conversions to `int`.
We could also achieve that using `template <typename U> Id(Id<U>) = delete;`, but it turns out that that causes issues
for the `EdgeId::operator UndirectedEdgeId` below. There, while `UndirectedEdgeId x = EdgeId{};` compiles with this approach,
but `UndirectedEdgeId x(EdgeId{});` doesn't. So to allow both forms, this constructor must be written this way, as a template.
The `= int` is there only to make the bindings emit this constructor, I don't think it affects anything else.
| None mrmeshpy.VertId.__init__ |
( |
| self, |
|
|
int | i ) |
Allow constructing from `int` and other integral types.
This constructor is written like this instead of a plain `Id(int)`, because we also wish to disable construction
from other unrelated `Id<U>` specializations, which themselves have implicit conversions to `int`.
We could also achieve that using `template <typename U> Id(Id<U>) = delete;`, but it turns out that that causes issues
for the `EdgeId::operator UndirectedEdgeId` below. There, while `UndirectedEdgeId x = EdgeId{};` compiles with this approach,
but `UndirectedEdgeId x(EdgeId{});` doesn't. So to allow both forms, this constructor must be written this way, as a template.
The `= int` is there only to make the bindings emit this constructor, I don't think it affects anything else.