From 774f95759908891d9f9bcd2dd3271f5c148359d7 Mon Sep 17 00:00:00 2001 From: skye Date: Sat, 7 Mar 2026 18:39:30 -0500 Subject: [PATCH] libexpr/attr-set.hh: Deprecate Attr default constructor The default constructor of Attr default constructs a Value, which is itself deprecated. Therefore the default constructor of Attr must itself be either deprecated in turn or removed. The default can't be trivially deleted because Bindings::EMPTY depends on the default constructor of Bindings which depends on Attr's default constructor, so I'm settling for deprecating it for now. Part of work towards #744 Change-Id: Ie34b08788780615c5478a0354122530b6a6a6964 --- lix/libexpr/attr-set.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lix/libexpr/attr-set.hh b/lix/libexpr/attr-set.hh index 5a9d971f9..dbec1f4dc 100644 --- a/lix/libexpr/attr-set.hh +++ b/lix/libexpr/attr-set.hh @@ -25,7 +25,8 @@ struct Attr PosIdx pos; mutable Value value; Attr(Symbol name, Value value, PosIdx pos = noPos) : name(name), pos(pos), value(value) {} - Attr() { }; + [[deprecated]] + Attr() {}; bool operator < (const Attr & a) const { return name < a.name;