work around C++ language defect to fix VC compilation

http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#325
hacks to fix output of grids