Beispiel noexcept

noexcept.cpp
#include <iostream>
 
int square(int n) noexcept
{
  return n*n;
}
 
int main()
{
  std::cout << square(3) <<  '\n';
}