附 录 特性章节对照表

特性章节对照表

特性

标准

章节

[[carries_dependency]] attribute

11

31.5.2

[[deprecated]] attribute

14

31.5.3

[[fallthrough]] attribute

17

31.5.4

[[likely]] and [[unlikely]] attributes

20

31.5.7

[[maybe_unused]] attribute

17

31.5.6

[[no_unique_address]] attribute

20

31.5.8

[[nodiscard]] attribute

17

31.5.5

[[noreturn]] attribute

11

31.5.1

__has_include

17

32.1

__VA_OPT__

20

32.3

add an rvalue reference

11

6

adding the constinit keyword

20

27.15

adding the long long type

11

1.1

adding u8 character literals

17

1.3

ADL and function templates that are not Visible

20

37.4

alignas

11

30.3

alignof

11

30.4

allow constant evaluation for all non-type template arguments

17

37.1

allow defaulting comparisons by value

20

34.4

allow initializing aggregates from a parenthesized list of values

20

15.5

allow pack expansion in lambda init-capture

20

35.8

allow structured bindings to accessible members

20

20.5

allow typename in a template template parameter

17

36.1

array size deduction in new-expressions

20

34.5

attribute specifier sequence

11

31.3

auto

11

3

binary literals

14

29.2

changing the active member of a union inside constexpr

20

27.13

char8_t: a type for UTF-8 characters and strings

20

1.3

class template argument deduction for aggregates

20

38.5

class template argument deduction for alias templates

20

38.4

class types in non-type template parameters

20

37.5

concepts

20

41

consistent comparison

20

24

const mismatch with defaulted copy constructor

20

34.9

consteval

20

27.14

constexpr

11

27

constexpr if

17

27.9

construction rules for enum class values

17

14.3

copy elision

11

34.3

coroutines

20

33

declaring non-type template parameters with auto

17

3.6

decltype

11

4

default constructible and assignable stateless lambdas

20

7.4

default member initializers for bit-fields

20

8.2

defaulted and deleted functions

11

10

delegating constructors

11

12

deprecate implicit capture of this via [=]

20

7.9

deprecate uses of the comma operator in subscripting expressions

20

34.11

deprecating volatile

20

34.10

designated initialization

20

9.5

down with typename

20

36.2

explicit conversion operator

11

34.1

explicit virtual overrides

11

16

explicit(bool)

20

42.5

extended constexpr

14

27.6

extended friend declarations

11

42.3

extension to aggregate initialization

17

15.2

extern template

11

42.1

familiar template syntax for generic lambdas

20

7.10

folding expressions

17

35.5

generalized lambda-capture

14

7.6

generalizing the range-based for loop

17

17.3

generic lambda expressions

14

7.7

hexadecimal floating literals

11

29.1

inheriting constructors

11

13

initializer list

11

9

inline namespace

11

2.1

inline variables

17

26

integrating feature-test macros

20

32.2

lambda capture of *this by value as [=,*this]

17

7.8

lambda expressions

11

7

local and unnamed types as template arguments

11

37.2

make exception specifications be part of the type system

17

21.6

matching of template template-arguments excludes compatible templates

17

37.6

nested inline namespaces

17

2.2

new character types

11

1.2

noexcept

11

21

non-static data member initializers

11

8.1

nullptr

11

23

pack expansions in using-declarations

17

35.7

permit conversions to arrays of unknown bound

20

34.6

permitting trivial default initialization in constexpr contexts

20

27.12

prohibit aggregates with user-declared constructors

20

15.4

range-based for loop

11

17

raw string literals

11

29.4

refining expression evaluation order

17

28

replacement of class objects containing reference members

17

34.2

return type deduction for normal functions

14

3.4

right angle brackets

11

42.2

selection statements with initializer

17

18

single-quotation-mark as a digit separator

11

29.3

solving the SFINAE problem for expressions

11

40

static_assert

11

19

std::is_constant_evaluated()

20

27.16

strongly typed enums

11

14

structured bindings

17

20

template argument deduction for class templates

17

38.1

template deduction guides

17

39

templates aliases

11

22.2

thread_local

11

25

trailing function return types

11

5

try-catch blocks in constexpr functions

20

27.11

unrestricted unions

11

11

user-defined literals

11

29.5

using attribute namespaces without repetition

17

31.4

using enum

20

14.4

variable templates

14

42.4

variadic templates

11

35

yet another approach for constrained declarations

20

41.9