C++ Language/ProgramFlow/Parameters/UnusedParameter

From Wikibooks, open books for an open world
Jump to navigation Jump to search

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)