Apart from what was pointed out in the comments, which is to force the value of `j`, you can use a lambda and call it inline. It's a bit ugly but does the job:
for( int i = 0 ; i < n ; i++ ){
[&]()
{
for( int j = 0 ; j < n ; j++ ){
if( condition ){
return
}
// some work being done
work();
}
}();
}