please, replace ...type## with type, i.e. remove two # characters after type, otherwise the code does not build with some compilers.