Yak*_*ont 1248
[*this]{ std::cout << could << " be " << useful << '\n'; }using在属性中避免重复属性命名空间.
编译器现在需要忽略它们无法识别的非标准属性.
简单static_assert(expression);,没有字符串
不,throw除非throw(),throw()是noexcept(true).
std::tie的autoconst auto [it, inserted] = map.insert( {"foo", bar} );it并inserted从与推导的类型pair是map::insert返回.std::array和相对扁平的结构if (init; condition) and switch (init; condition)
if (const auto [it, inserted] = map.insert( {"foo", bar} ); inserted)if(decl) to cases where decl isn't convertible-to-bool sensibly.Generalizing range-based for loops
Fixed order-of-evaluation for (some) expressions with some modifications
.then on future work.Forward progress guarantees (FPG) (also, FPGs for parallel algorithms)
u8'U', u8'T', u8'F', u8'8' character literals (string already existed)
inherited constructors fixes to some corner cases (see P0136R0 for examples of behavior changes)
std::string like reference-to-character-array or substringstring const& again. Also can make parsing a bajillion times faster."hello world"svchar_traitsstd::byte off more than they could chew.
std::invoke
std::apply
std::make_from_tuple, std::apply applied to object construction
is_invocable, is_invocable_r, invoke_result
result_ofis_invocable<Foo(Args...), R> is "can you call Foo with Args... and get something compatible with R", where R=void is default.invoke_result<Foo, Args...> is std::result_of_t<Foo(Args...)> but apparently less confusing?[class.directory_iterator] and [class.recursive_directory_iterator]
fstreams can be opened with paths, as well as with const path::value_type* strings.
for_each_n
reduce
transform_reduce
exclusive_scan
inclusive_scan
transform_exclusive_scan
transform_inclusive_scan
Added for threading purposes, exposed even if you aren't using them threaded
atomic<T>::is_always_lockfree
std::lock pain when locking more than one mutex at a time.std algorithms, and related machinery[func.searchers] and [alg.search]
std::function for allocatorsstd::sample, sampling from a range?
try_emplace and insert_or_assign
Splicing for map<>, unordered_map<>, set<>, and unordered_set<>
non-const .data() for string.
non-member std::size, std::empty, std::data
std::begin/endThe emplace family of functions now returns a reference to the created object.
unique_ptr<T[]> fixes and other unique_ptr tweaks.weak_from_this and some fixed to shared from thisstd datatype improvements:{} construction of std::tuple and other improvementsC++17 library is based on C11 instead of C99
Reserved std[0-9]+ for future standard libraries
std implementations exposedstd::clamp()
std::clamp( a, b, c ) == std::max( b, std::min( a, c ) ) roughlygcd and lcmstd::uncaught_exceptions
std::as_conststd::bool_constant_v template variables