issue: #440936 make 'for_next' branch c++ compatible - temp fix
for compilation errors on some platforms till we have a comperhensive
fix

Change-Id: I990ccf5d03f224a711cc0c0a64ea1ea1e183f10b