it complies and crow updated

This commit is contained in:
moneroexamples 2016-09-06 18:34:07 +08:00
parent 9b3a27baa9
commit f9925d6c3b
20 changed files with 870 additions and 513 deletions

6
ext/crow/mustache.h Normal file → Executable file
View file

@ -520,7 +520,11 @@ namespace crow
inline std::string default_loader(const std::string& filename)
{
std::ifstream inf(detail::get_template_base_directory_ref() + filename);
std::string path = detail::get_template_base_directory_ref();
if (!(path.back() == '/' || path.back() == '\\'))
path += '/';
path += filename;
std::ifstream inf(path);
if (!inf)
return {};
return {std::istreambuf_iterator<char>(inf), std::istreambuf_iterator<char>()};