#include "openfile.hpp" #include namespace Files { std::unique_ptr openBinaryInputFileStream(const std::string& path) { auto stream = std::make_unique(path, boost::filesystem::fstream::binary); if (!stream->is_open()) throw std::runtime_error("Failed to open '" + path + "' for reading: " + std::strerror(errno)); stream->exceptions(boost::filesystem::fstream::badbit); return stream; } }