diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/nixexpr.hh index a42a916e2..281881543 100644 --- a/src/libexpr/nixexpr.hh +++ b/src/libexpr/nixexpr.hh @@ -27,11 +27,10 @@ struct Pos uint32_t line; uint32_t column; - struct no_pos_tag {}; struct stdin_tag {}; struct string_tag {}; - typedef std::variant Origin; + typedef std::variant Origin; Origin origin; @@ -67,7 +66,8 @@ public: // current origins.back() can be reused or not. mutable uint32_t idx = std::numeric_limits::max(); - explicit Origin(uint32_t idx): idx(idx), origin{Pos::no_pos_tag()} {} + // Used for searching in PosTable::[]. + explicit Origin(uint32_t idx): idx(idx), origin{Pos::stdin_tag()} {} public: const Pos::Origin origin;