The canon, now with language support: pimpl via unique_ptr, copy-and-swap, Meyers singleton blessed by magic statics, erase-remove for containers, RAII scope guards.
v.erase(std::remove_if(v.begin(), v.end(), bad), v.end());
Registry& instance() {
static Registry r;
return r;
}
std::exchange becomes the micro-idiom inside move operations and resource stealing.
overloaded (via aggregate CTAD + pack expansion in using) becomes the standard visitor companion; std::scope_exit stays in a TS but the pattern is everywhere.
template <class... Ts> struct overloaded : Ts... { using Ts::operator()...; };
template <class... Ts> overloaded(Ts...) -> overloaded<Ts...>;
Library absorbs the idioms: std::erase_if kills erase-remove, starts_with/ends_with kill substring checks, [[no_unique_address]] replaces EBO-by-inheritance.
std::erase_if(v, bad);
struct Flat { [[no_unique_address]] Empty policy; };
More absorption: std::to_underlying (enum cast), std::unreachable (the UB hint), std::byteswap, monadic optional replacing hand-rolled chains.
#embed retires the xxd-generated byte-array idiom; std::inplace_vector retires hand-written fixed-capacity vectors.
static constexpr unsigned char splash[] = {
#embed "splash.png"
};
C++29direction · not adopted
Direction: pattern matching would retire the overloaded visitor idiom itself — the last big hand idiom with no language spelling.