boost 中有一个edmian 里面有转换函数模板 native_to_little<T> 本地转换为小端 native_to_bit<T> 本地转换为大端 转载于:https://www.cnblogs.com/suyunhong/p/7884083.html