Open SteveBronder opened 5 years ago
For if constexpr
in particular we could use BOOST_IF_CONSTEXPR
but personally I'd really like to avoid having macros everywhere (you can see in the example branch we would have to use this everywhere).
But there's a lot of stuff that we can't macro out. There's a list of C++17 niceties here here of new C++17 features (full list here). In particular things like structured bindings, Template argument deduction for class templates, folding expressions, etc. Having these features would clean up a lot of current stuff that's gross we need to do that is simple with 17
@bgoodri does rstan still need to test windows on older gcc versions or is the minimum version of gcc now 8+?
We will probably require R >= 4.x in April, in which case RTools based on gcc 4.9 would no longer be supported and the C++17 flag is an option. I don't think 100% of C++17 was in g++-8 but it is close.
On Tue, Jan 12, 2021 at 4:48 PM Steve Bronder notifications@github.com wrote:
@bgoodri https://github.com/bgoodri does rstan still need to test windows on older gcc versions or is the minimum version of gcc now 8+?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stan-dev/math/issues/1300#issuecomment-759053369, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ2XKV5XTGSSHGAOXSVRZ3SZS7TXANCNFSM4IJJSR7A .
Looking at the support sheet it seems like gcc8 is the version that finalizes 17
For some operationalization of final. The page it links to
https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.2017
lists the known exceptions, but it was pretty close in g++-8.
On Tue, Jan 12, 2021 at 11:24 PM Steve Bronder notifications@github.com wrote:
Looking at the support sheet it seems like gcc8 is the version that finalizes 17
https://gcc.gnu.org/projects/cxx-status.html#cxx17
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stan-dev/math/issues/1300#issuecomment-759196417, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ2XKVJ5KYDJYOMUSM4E7DSZUN75ANCNFSM4IJJSR7A .
ah icic, looking over that it mostly seems like the stuff that didn't get into 8 is related to working with chars, strings, file system, the parallism TS, and the memory_resource
header. I think thats fine?
Description
Jw, what are the blockers that stop us from moving to C++17?
There's a couple features that I think would be nice. From here
namespace X::Y { … }
instead ofnamespace X { namespace Y { … } }
std::is_arithmetic<Args> &&...
)if constexpr(expression)
(No more#ifdefs
for the OpenCL code!)T
from prvalue expressions of typeT
(ignoring top-level cv-qualifiers) shall result in no copy or move constructors from the prvalue expression.From that same wiki page it looks like we would have to bump up the supported compiler versions?
Current Version:
v2.20.0