What are the available standard attributes in C++?
Show answer and explanation
Standard attributes use [[...]] syntax. Across C++11–20 the main ones include noreturn, carries_dependency, deprecated, fallthrough, nodiscard, maybe_unused, likely, unlikely, and no_unique_address; support and placement rules depend on the chosen standard.
Standard attributes use [[...]] syntax. Across C++11–20 the main ones include noreturn, carries_dependency, deprecated, fallthrough, nodiscard, maybe_unused, likely, unlikely, and no_unique_address; support and placement rules depend on the chosen standard.
Connect the conclusion directly to the type, lifetime, ownership, overload-resolution rule, or library contract present in the question. State implementation dependence or a violated precondition explicitly instead of merely guessing output.