
13 Jan
2013
13 Jan
'13
7:37 p.m.
Den Sun, 13 Jan 2013 20:30:14 +0100 skrev Vicente J. Botet Escriba <vicente.botet@wanadoo.fr>: [snip]
Of course in order to be really structired the jumping to the underlying label should be forbiden (by the compiler), but I don't think that a preprocessor solution could take care of this. So the following not desired and not structured code could compile even if we would like an compile error.
BOOST_NAMED_BLOCK(L) { // ... } // [1] //... BOOST_BREAK(L); // go to [1]
So, the underlying idea is to get something like "break" and "continue" to work inside any "named" block, not just loops? If so (as you demonstrate above) I'm fairly certain a correct solution cannot be implemented using just the preprocessor. /Brian