/*
test.cpp
© Andrey Bushman, 18 Jun 2013
*/
//--------------------------------------------
#include <exception>
#include <iostream>
using namespace std;
//--------------------------------------------
namespace Bushman{
//--------------------------------------------
    class MyClass{
    public:
        MyClass();
    };
//--------------------------------------------
    MyClass::MyClass(){
        void func(); // declaration
        func(); // call
    }
//--------------------------------------------
    void func(){ // definition
        cout << "Ping..." << endl;
    }
}
//============================================
int main()
try{
    namespace B = Bushman;
    B::MyClass a;
}
catch(exception& e){
    cerr << e.what() << endl;
    return 1;
}
catch(...){
    cerr << "Unknown exception." << endl;
    return 2;
}
