From 5cb43631debbebb413de54b770118b13482a6176 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 8 Mar 2022 15:37:56 +0300 Subject: Fix operator<<(ostream,target_state) --- libbuild2/target-state.hxx | 3 +++ libbuild2/target.cxx | 1 + 2 files changed, 4 insertions(+) diff --git a/libbuild2/target-state.hxx b/libbuild2/target-state.hxx index 48d683d..ea7015c 100644 --- a/libbuild2/target-state.hxx +++ b/libbuild2/target-state.hxx @@ -20,6 +20,9 @@ namespace build2 // // Note also that value 0 is available to indicate absent/invalid state. // + // NOTE: don't forget to also update operator<<(ostream,target_state) if + // changing anything here. + // enum class target_state: uint8_t { unknown = 1, diff --git a/libbuild2/target.cxx b/libbuild2/target.cxx index 7ab0abd..c3c03d7 100644 --- a/libbuild2/target.cxx +++ b/libbuild2/target.cxx @@ -69,6 +69,7 @@ namespace build2 // static const char* const target_state_[] = { + "", // Absent/invalid (see target_state for details). "unknown", "unchanged", "postponed", -- cgit v1.1