#include #include #include #include "date.h" using namespace std; int main() { int status = EXIT_FAILURE; try { date d(date::december, 31, INT_MAX); cout << ++d << "\n"; //cout << d.operator++() << "\n"; status = EXIT_SUCCESS; } catch (const date::bad_month& bm) { cerr << bm << "\n"; //operator<<(cerr, bm) << "\n"; } catch (const date::bad_month_and_day& bd) { cerr << bd << "\n"; } catch (const date::overflow& ov) { cerr << ov << "\n"; } catch (const date::underflow& un) { cerr << un << "\n"; } catch (...) { cerr << "Caught unexpected exception.\n"; } return status; }