slycelote / caide

Automates certain common tasks that you do during programming competitions
84 stars 18 forks source link

_USE_MATH_DEFINES gets removed #12

Closed Predelnik closed 5 years ago

Predelnik commented 7 years ago

After a bit of playing around I've found the following workaround (just to use macro in next line):

   #define _USE_MATH_DEFINES
   _USE_MATH_DEFINES

While workaround is not actually that bad, it may still be unobvious. So probably it's at least advisable to add it to readme or maybe fix it other way if it is possible.

slycelote commented 7 years ago

Right, unused macro definitions get removed, but sometimes it's undesirable. There is already parameter keep_macros that avoids collapsing this:

#ifdef _WIN32
//windows specific
#else
//other
#endif

into

// windows specific

I'm going to make it work for your scenario too.

slycelote commented 5 years ago

This will be fixed in the next release.