72 using quadrilateralid_t = Id<class Quadrilateral>; |
72 using quadrilateralid_t = Id<class Quadrilateral>; |
73 using edgeid_t = Id<class EdgeLine>; |
73 using edgeid_t = Id<class EdgeLine>; |
74 using conditionaledgeid_t = Id<class ConditionalEdge>; |
74 using conditionaledgeid_t = Id<class ConditionalEdge>; |
75 using subfileid_t = Id<class SubfileReference>; |
75 using subfileid_t = Id<class SubfileReference>; |
76 |
76 |
77 constexpr struct |
77 constexpr struct NullId |
78 { |
78 { |
79 template<typename T> |
79 template<typename T> |
80 constexpr operator Id<T>() const |
80 constexpr operator Id<T>() const |
81 { |
81 { |
82 return Id<T>{0}; |
82 return Id<T>{0}; |
83 } |
83 } |
|
84 static constexpr decltype(ldraw::id_t::value) value = 0; |
84 } NULL_ID = {}; |
85 } NULL_ID = {}; |
85 |
86 |
86 template<typename T> |
87 template<typename T> |
87 inline bool operator==(Id<T> one, decltype(NULL_ID)) |
88 inline bool operator==(Id<T> one, decltype(NULL_ID)) |
88 { |
89 { |