Jump to content

C++ Language/ProgramFlow/Parameters/UnusedParameter

From Wikibooks, open books for an open world

Many compilers will warn you if you define a parameter that isn't used anywhere inside your function. If you are doing this intentionally, mark that parameter with [[maybe_unused]].

Additional information about unused parameters (includes interactive examples)