是否有一种编程方式来检测您是否在大端或小端架构上?我需要能够编写将在Intel或PPC系统上执行的代码并使用完全相同的代码(即没有条件编译).
c++ algorithm endianness
algorithm ×1
c++ ×1
endianness ×1