 +extensions_extra_compile_args = ['/EHsc', '/Ox', '-DBOOST_DATE_TIME_NO_LIB']
  
  stanc_sources = [
-     "pystan/stan/src/stan/gm/grammars/var_decls_grammar_inst.cpp",
+     "pystan/stan/src/stan/gm/ast_def.cpp",                                    
 
 --- pystan\model.py
 +++ pystan\model.py

         distutils.log.set_verbosity(verbose)
         extension = Extension(name=module_name,
                               language="c++",

--- pystan\stan\src\stan\gm\grammars\functions_grammar_def.hpp
+++ pystan\stan\src\stan\gm\grammars\functions_grammar_def.hpp
@@ -126,7 +126,7 @@
       static bool fun_exists(const std::set<std::pair<std::string,
                                                       function_signature_t> >& existing,
                              const std::pair<std::string,function_signature_t>& name_sig) {
-        for (std::set<std::pair<std::string, function_signature_t> >::iterator it 
+        for (std::set<std::pair<std::string, function_signature_t> >::const_iterator it
                = existing.begin();
              it != existing.end();
              ++it)

--- setup.py
+++ setup.py
@@ -119,7 +119,7 @@ libstan = ('stan', {'sources': libstan_sources,
                     'macros': stan_macros})
 
 ## extensions
