You should declare template specializations in header and define them in source file. You version of class bin_out is not cross-platform.