1 // vim: set expandtab tabstop=4 shiftwidth=4:
3 #include "fast/basic_template.h"
4 #include "fast/get_file_content.h"
10 int main(int argc, char* argv[]) {
11 std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
13 std::cerr << "Argument missing." << std::endl;
15 } else if (!(argc % 2)) { // is even
16 std::cerr << "Malformed arguments." << std::endl;
19 fast::basic_template< fast::get_file_content, std::string, std::map > tpl(argv[1]);
20 std::string block = argv[2];
22 for (int i = 3; i < argc; ++i) {
23 vars[argv[i]] = argv[++i];
25 std::cout << tpl.parse(block, vars);