This project has been developed for more than a year. It's a third version (but the name historically was left as CPv2) and I think it's finally ready to be presented to you.
CPv2 — Meet a new and great Competitive programming environment for C++ to make life easier!
Main features are:
- fast compilation (with precompiled headers)
- time and memory measurements
- variety of run modes
- built in snippets support
- built in templates support
- file io
- ships with premade code template ( REPLACED CIN/COUT WITH MUCH BETTER THINGS! )
- console interface with formatted output
Link to github: https://github.com/lis05/CPv2
You absolutely MUST take a look at the replacements for cin/cout. They are the best thing I've ever seen in my life.
is it available for windows?
No. It uses bash and Unix filesystem.
okk
I believe there may be some workaround with Cygwin or something of that sort.
Unfortunately, the pragmas don't do anything in the template, and the typedefs break on different architectures (that's why the STL has things like
uint32_t
). For the multiple definitions of the same macro, you might want to look into variadic arguments. Also, using the name__print
is undefined behaviour and is reserved for the implementation, so you might want to use something different.Hi! Thank you for your comment.
I removed typedefs and replaced everything with STL types. Also replaced __print with __print_data. However, regarding pragmas, I've been using them for quite some time, and I'm sure they must work. Can you elaborate a little bit please?
My bad, I meant variables starting with a double underscore are reserved for the implementation. Variables should not start with a single underscore either — things like
_start
and_main
are also reserved (so just avoid this kind of naming, and instead use a namespace to define such functions if you really want to separate the naming).For fixing the pragma issue, note that the pragmas go before anything else in the file (even before the includes, so that they can optimize what is in the headers as well).
I see. I originally placed pragmas after the include file because otherwise fast compilation wouldn't work (precompiled header wouldn't get used by the compiler). I will add a workaround to this. Thanks!
-