aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/suggestions.hh
AgeCommit message (Collapse)Author
2024-05-29util.hh: Delete remaining file and clean up headersTom Hubrecht
Change-Id: Ic1f68e6af658e94ef7922841dd3ad4c69551ef56
2023-03-31Ensure all headers have `#pragma once` and are in API docsJohn Ericson
`///@file` makes them show up in the internal API dos. A tiny few were missing `#pragma once`.
2023-03-31Extend internal API docs, part 2John Ericson
Picking up from #8111. Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2022-03-07Merge `or-suggestions.hh` into `suggestions.hh`regnat
No real need for keeping a separate header for such a simple class. This requires changing a bit `OrSuggestions<T>::operator*` to not throw an `Error` to prevent a cyclic dependency. But since this error is only thrown on programmer error, we can replace the whole method by a direct call to `std::get` which will raise its own assertion if needs be.
2022-03-07Implement `operator<<` for Suggestionsregnat
That way there’s no need to explicitely convert it to a string when printing it
2022-03-07Move OrSuggestions to its own headerregnat
Prevents a recursive inclusion
2022-03-07Also display suggestions for the commands using the eval cacheregnat
Make `nix build .#nix-armv8l-linux` work for example
2022-03-07Add some tests for the suggestionsregnat
2022-03-07Implement a suggestions mechanismregnat
Each `Error` class now includes a set of suggestions, and these are printed by the top-level handler.