C++ keyword: default - cppreference.com

Usage

switch statement

: as the declaration of the default case label

explicitly-defaulted function definition: as an explicit instruction to the compiler to generate

special member function

or a

comparison operator

(since C++20) for a class.

(since C++11)See also

if

statement:

if

,

else

switch

statement:

switch

,

case

goto

statement:

goto

continue

statement:

continue

break

statement:

break

return

statement:

return

do-while

loop and

while loop

:

do

,

while

for

loop and

range-based for loop

:

for