Should we switch over to a newer C++ version? #225
Unanswered
crisluengo
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I found myself wanting to use
inline static constexprclass member variables, but couldn't because we're using C++14, it was introduced in C++17.What are the downsides of upgrading? Would we continuously upgrade to the latest version of the standard, or the 5-year-old version, or...? Would we upgrade only if a new feature makes it worthwhile? Should we never upgrade?
New stuff that would be useful in DIPlib:
std::filesystem::std::string_viewstd::optionalandstd::variantif constexprinline static)auto [a, b, c] = ...)[[fallthrough]](currently using compiler-dependent comments)[[nodiscard]](which we're currently already using if the compiler supports it){.x = 1, .y = 2})void func(auto);)std::format()std::string::starts_with()andstd::string::ends_with()std::ranges::std::float16zanduzsuffix forstd::size_tandstd::ptrdiff_tstd::flat_set,std::flat_multiset,std::flat_map,std::flat_multimap(sets and maps with fewer mallocs)All reactions