Partial progress: on my Ubuntu 16.04 server, I have added a Makevars
and got a working version of 2.16.2. The error is now downgraded to a warning (not that I love it), but again, USE_CXX11 has not been picked up as the warning message shows. clang 3.5 is installed.
No progress yet on TravisCI where I cannot simply change the system.
clang++ -I/usr/share/R/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/usr/lib/R/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R/site-library/RcppEigen/include" -I"/usr/local/lib/R/site-library/BH/include" -I"/usr/local/lib/R/site-library/StanHeaders/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c lang__grammars__whitespace_grammar_inst.cpp -o lang__grammars__whitespace_grammar_inst.o In file included from lang__grammars__whitespace_grammar_inst.cpp:19: In file included from /usr/local/lib/R/site-library/StanHeaders/include/src/stan/lang/grammars/whitespace_grammar_inst.cpp:1: In file included from /usr/local/lib/R/site-library/StanHeaders/include/src/stan/lang/grammars/whitespace_grammar_def.hpp:5: In file included from /usr/local/lib/R/site-library/StanHeaders/include/src/stan/lang/grammars/semantic_actions.hpp:6: In file included from /usr/local/lib/R/site-library/StanHeaders/include/src/stan/lang/ast.hpp:68: /usr/local/lib/R/site-library/StanHeaders/include/src/stan/lang/ast/node/conditional_op.hpp:40:21: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool has_var_ = false; ^ 1 warning generated.