gabrielsimoes / cfparser.vim

A codeforces plugin ported from emacs plugin gnull/cfparser.
Do What The F*ck You Want To Public License
48 stars 10 forks source link

Add c++17 support #9

Closed jakobkogler closed 6 years ago

jakobkogler commented 6 years ago

Codeforces now supports C++17. This commit adds a variable with the index, and sets C++17 as default compiler.

gabrielsimoes commented 6 years ago

Do you think C++17 should be the default compiler for C++ programs?

gabrielsimoes commented 6 years ago

I'm not sure if it breaks something/has optimal input/output.

jakobkogler commented 6 years ago

C++17 is backwards compatible. And input/output speed should be the same. Codeforces uses a modified compiler to make that sure. I don't see any reason not to use C++17 by default.

If you don't want to make it a default, we should provide an option to change the compiler in the .vimrc. Currently you manually have to change the plugin if you want to use a different compiler. E.g. writing let g:cf_pl_by_ext['.cpp'] = g:cf_pl_gpp14 or let g:cf_pl_ext['.cpp'] = 42 in the .vimrc doesn't work, since the the plugin loads after the .vimrc and overwrites the dict.