Add File::write() that takes std::array.

This commit is contained in:
Jared Boone 2016-02-18 21:34:03 -08:00
parent 083711ceb2
commit 7cf55cef52

View File

@ -26,6 +26,7 @@
#include <cstddef>
#include <string>
#include <array>
class File {
public:
@ -40,6 +41,11 @@ public:
bool read(void* const data, const size_t bytes_to_read);
bool write(const void* const data, const size_t bytes_to_write);
template<size_t N>
bool write(const std::array<uint8_t, N>& data) {
return write(data.data(), N);
}
bool puts(const std::string& string);
bool sync();