If-constexpr in Stan Math?


What’s the consensus on using if-constexpr in writing the Stan Math library? (See [here](https://hackernoon.com/a-tour-of-c-17-if-constexpr-3ea62f62ff65 .) As I understand it, it is a C++ 17 feature, so I am probably not allowed to use it. However, I wanted to confirm just to be sure as it would avoid a lot of code bloat in various places.

According to the cppreference, they are supported from
GCC 7, Clang 3.9, MSVC 19.11.


Current makefile won’t make it, as it still uses std=c++1y.


The least common denominator is approximately g++-4.9.3 because of that is what is in Rtools for Windows, although the closest MSVC to g++-4.9.3 is lacking a few things.


Thanks! So I guess we’ll just have to suck up the bloated code for now. Let’s hope Rtools moves on soon.


As mentioned in your link, one can still use SFINAE.


I hear the target is this summer. And as an added bonus, RStudio’s going to build in devtools installer in a platform-specific way. That should make Stan a lot easier to install for most R users.