slerena 8594b9936c 012-05-05 Sancho Lerena <slerena@artica.es>
* anytermd: Added anyterm to extras. Included modifications on original
	anytermd project source code. Added a new spec file for centos/fedora/rhel.
	Tested on FC16/i386 and centos6/x86_84.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6257 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-05-04 19:14:27 +00:00

32 lines
431 B
C++

#include <iostream>
#include "safe_int.hh"
#include "Exception.hh"
using namespace std;
using namespace pbe;
typedef safe_int<7> safe_byte;
int main(int argc, char* argv[])
{
try { try {
safe_byte a = 1;
for (int i=0; i<1024; ++i) {
cout << "a = " << a << "\n";
a = a * static_cast<safe_byte>(3);
}
return 0;
} RETHROW_MISC_EXCEPTIONS }
catch (Exception& E) {
E.report(cerr);
}
}