diff --git a/src/libutil/error.cc b/src/libutil/error.cc index 40354cc87..a5571d4ec 100644 --- a/src/libutil/error.cc +++ b/src/libutil/error.cc @@ -8,6 +8,11 @@ namespace nix std::optional ErrorInfo::programName = std::nullopt; +std::ostream& operator<<(std::ostream &os, const hintformat &hf) +{ + return os << hf.str(); +} + string showErrPos(const ErrPos &errPos) { if (errPos.column > 0) { diff --git a/src/libutil/error.hh b/src/libutil/error.hh index 8286eaab1..5658e6335 100644 --- a/src/libutil/error.hh +++ b/src/libutil/error.hh @@ -92,10 +92,7 @@ private: format fmt; }; -std::ostream& operator<<(std::ostream &os, const hintformat &hf) -{ - return os << hf.str(); -} +std::ostream& operator<<(std::ostream &os, const hintformat &hf); template inline hintformat hintfmt(const std::string & fs, const Args & ... args)