C++17 is well supported by all major compilers and I think we should move soon-ish as it has a lot of useful features and improvements (std::optional/any/variant, nested namespaces syntax, filesystem, structured bindings, etc)
This issue tracks what needs to be done.
std::random_shuffle. This was deprecated in C++14 and removed in C++17. I'm making a PR that moves to random_pool#Shuffle *cryptopp which uses std:: features that's been deprecated since C++11 and removed in C++17. cryptopp has been C++17 compliant since January ***) https://github.com/nanocurrency/raiblocks/pull/1045
) https://github.com/nanocurrency/raiblocks/pull/1068 / https://github.com/weidai11/cryptopp/pull/559
*) node and wallet works on macOS/clang
What Linux distro versions have gcc/clang versions that support c++17 installed or supported?
I鈥檇 like to make sure we don鈥檛 require too new of a distro version, especially if it gets us off of commonly used LTS versions.
Added that point to the list of things to do. No rush moving to C++17, but if it's supported everywhere, it looks like a good move.
have you looked at MSVC support? I have moved auto builds to MSVC15 in appveyor
argakiig yeah, it's a bit too soon still for msvc - see C++17 section at https://en.cppreference.com/w/cpp/compiler_support
We should probably wait with the move until we can rely on VS 17.
If #1439 is merged, update locks used by rpc_stats_objects_generated to use std::scoped_lock
@cryptocode It seems MSVC17 now has full support of C++17
@SergiySW Excellent! The question now is if commonly used LTS distros support it, as Colin noted above.
Debian 9 Stretch - GCC 6.3 (no)
Debian 10 Buster (release estimated mid-2019) - GCC 8.2 (yes)
Ubuntu 16.04 LTS - GCC 5.3 (no)
Ubuntu 18.04 LTS - GCC 7.4 (yes, except Elementary string conversions & std::filesystem)
RHEL 7 / CentOS 7 - GCC 4.8 (no)
RHEL 8 beta / CentOS 8 (mid-2019 ?) - GCC 8.2 (yes)
Nice overview @SergiySW. So I guess it's still too early, not sure we can always ask to upgrade GCC in the (no) cases.
Some Linux distribution C++17 support (recent versions):
Most helpful comment
@cryptocode It seems MSVC17 now has full support of C++17