// Example in C++14 Standard (ISO/IEC 14882:2014), Section 7.1.5, Paragraph 5.
#include <iostream>
using namespace std;

constexpr int f(bool b){ return b ? throw 0 : 0; } // OK 

constexpr int f() { return f(true); } // ill-formed, no diagnostic required

int main(){

    try{
        f();
    }catch( int x ){
        cout << "x = " << x << endl;
    }

    return 0;
}