1
0
mirror of https://github.com/Zygo/bees.git synced 2025-08-03 06:13:29 +02:00

bytevector: add ostream output with hexdump

There is a hexdump template in fs.  Move hexdump to its own header,
then ByteVector can use it too.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
Zygo Blaxell
2021-10-17 02:08:22 -04:00
parent 9cdeb608f5
commit d1015b683f
4 changed files with 47 additions and 24 deletions

View File

@@ -1,6 +1,8 @@
#include "crucible/bytevector.h"
#include "crucible/error.h"
#include "crucible/hexdump.h"
#include "crucible/string.h"
namespace crucible {
using namespace std;
@@ -144,4 +146,10 @@ namespace crucible {
{
return m_ptr.get();
}
ostream&
operator<<(ostream &os, const ByteVector &bv) {
hexdump(os, bv);
return os;
}
}