You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
296 B
10 lines
296 B
#pragma once
|
|
|
|
#include <fstream>
|
|
#include <string>
|
|
|
|
inline std::string slurp(std::string file_name){
|
|
std::ifstream f(file_name);
|
|
if (!f) throw std::runtime_error(std::string("Unable to open file: ") + file_name);
|
|
return {std::istreambuf_iterator<char>(f), std::istreambuf_iterator<char>()};
|
|
}
|
|
|