
6 Sep
2009
6 Sep
'09
4:10 p.m.
Pierre Morcello wrote:
Hello,
I propose a set of macros that allow to break anywhere. Example of use of the main macro :
// do something... BOOST_BREAKABLE { if (test1) { break; } if (test2)
{
break;
}
std::cout<<"this is never reached if test1==true or test2==true. "<<std::endl; // do something... } // here the program continues ...
Is there any interest in such a library?
What's the difference between this and a goto? Or a do ... while(false); loop? Both are probably shorter to write. Sebastian