C++ native scalar special-marker construction
For a writable native scalar type T, construct(to, marker, dir) shall begin a T object lifetime in the destination storage and assign the requested special marker. T shall be one of the eleven standard native integer types or a configured supported native floating-point type. The storage shall be suitably aligned, writable and large enough for one T. It may contain no live object, or a live trivially destructible T whose lifetime may be replaced. The caller shall own the storage and prevent overlapping access during lifetime replacement.
The special marker types shall be those of 🔗 1. Typed special-marker assignment to native integer storage. The new scalar's numerical value, exact Result code, representability flags and admitted rounding requests shall follow the corresponding raw integer destination in 🔗 1. Typed special-marker assignment to native integer storage or raw floating destination in 🔗 4. Typed special-value assignment to native floating-point storage. Supported special values shall be represented without a false unrepresentability flag; a NaN shall have an empty ordered relation. Unsupported results shall promise no payload. A live scalar object shall exist after normal return, including after an unsupported numerical result, and it shall be reusable as a destination without inspecting an unspecified payload. The marker shall remain unchanged.
These calls shall require no policy rounding default or result handler and shall not invoke a handler. They shall require no library initialization, coefficient-constant stage or FPU setup, and shall preserve hardware direction. Native floating-point exception/status conditions shall follow 🔗 4. Typed special-value assignment to native floating-point storage; unavailable formats shall not be instantiated. Normal C++ lifetime rules shall govern subsequent access, reuse and ending the new scalar's lifetime.
Construction begins an object lifetime rather than merely assigning a live value. Native scalars support both fresh aligned storage and transparent replacement without a class-resource cleanup obligation.
Public header: <ppl.hh>; effective instantiations in Parma_Polyhedra_Library for the admitted T and marker Special:
Result construct(T& to, const Special& marker, Rounding_Dir dir);
For each native integer and available floating type, construct each marker in fresh aligned storage and replace a live scalar. Check admitted requests, exact result codes, supported special payloads and unsupported result reuse, ending each new lifetime correctly. Check preserved markers and hardware direction without initialization, with no unavailable-format instantiations.
src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/checked_inlines.hh; src/checked_int_inlines.hh; src/checked_float_inlines.hh; tests/nativespecialconstructionspec1.cc.