template fixes in /include/cg/io