This is complements bswap(uint).
@WalterBright updated dlang/druntime pull request #3150 "add core.bitop.bswap(ushort)" fixing this issue: - fix Issue 21026 - add core.bitop.bswap(ushort) https://github.com/dlang/druntime/pull/3150
Because of overloading with bswap(uint), this breaks existing code. Rename to byteswap(ushort).
dlang/druntime pull request #3150 "fix Issue 21026 - add core.bitop.bswap(ushort)" was merged into master: - 43f21e81ccb63da1bd7638c55fa9e3d49409ba6c by Walter Bright: fix Issue 21026 - add core.bitop.byteswap(ushort) https://github.com/dlang/druntime/pull/3150