C++ keyword: break - cppreference.com (original) (raw)
[edit] Usage
- break statement: as the declaration of the statement
[edit] Example
#include int main() noexcept { for (int i{0}; i < 69; ++i) { if (i == 3) [[unlikely]] break; // breaks from the 'for' loop std::cout << i; } }
Output: