Skip to content

Attribute System

C++ attributes let you pass extra information to the compiler without changing code logic—"don't ignore this return value," "this variable might be unused but don't warn," "this branch is more likely to execute"... This information helps us catch bugs, suppress useless warnings, and even optimize performance. In this chapter, we cover the standard attributes from C++11-17 and the performance-oriented new attributes from C++20-23.

Chapter Contents

Built with VitePress