mirror of
https://github.com/MaskRay/ccls.git
synced 2025-01-19 03:55:49 +00:00
Add INVALID_ID as a constant for Id class Template
This is for identifying invalid ID from normal ID.
This commit is contained in:
parent
427f7b79e3
commit
b6539a2639
@ -35,6 +35,8 @@ template <typename T>
|
||||
struct Id {
|
||||
size_t id;
|
||||
|
||||
static constexpr size_t INVALID_ID = static_cast<size_t>(-1);
|
||||
|
||||
Id() : id(0) {} // Needed for containers. Do not use directly.
|
||||
explicit Id(size_t id) : id(id) {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user