www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19208] New: std.bitmanip.swapEndian doesn't support floating

https://issues.dlang.org/show_bug.cgi?id=19208

          Issue ID: 19208
           Summary: std.bitmanip.swapEndian doesn't support floating point
                    types
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: dkorpel live.nl

The template canSwapEndianness is defined as "isIntegral!T || isSomeChar!T ||
isBoolean!T || isFloatOrDouble!T" but in the function "swapEndian(T)(T val)" it
only supports an "integral value or character". I don't see why swapEndian
shouldn't support floating point types when read, write, append and peak do.

--
Aug 30 2018