libutil: add Bytes type
not used anywhere yet, but we'll use this a lot soon for generators that
return file contents, wire protocol fragments, or indeed any byte stream
Change-Id: I01a46f9bf9d75aaf4a5d7662773b99f498862a28
This commit is contained in:
parent
73ddc4540f
commit
4857feb910
|
@ -11,6 +11,7 @@
|
|||
#include <map>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
#include <span>
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
@ -19,6 +20,10 @@ typedef std::set<std::string> StringSet;
|
|||
typedef std::map<std::string, std::string> StringMap;
|
||||
typedef std::map<std::string, std::string> StringPairs;
|
||||
|
||||
// TODO this should be a std::byte span, but too much of the
|
||||
// current codebase predates std::byte and uses char instead
|
||||
using Bytes = std::span<const char>;
|
||||
|
||||
/**
|
||||
* Paths are just strings.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue