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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user