Parma Polyhedra Library requirements
C++ checked scalar special-marker wrappers
1. Checked special-marker construction and policy assignment PPL-SPEC-000848

For Checked_Number<T, Policy>, the underlying type T shall be an admitted native integer, mpz_class, mpq_class or configured supported native floating-point type. Native floating-point policies shall admit the format's infinities and quiet NaN. Marker types shall be Minus_Infinity, Plus_Infinity and Not_A_Number.

The explicit-direction marker constructor shall assign the special marker using the supplied direction and deliver that numerical Result exactly once to Policy::handle_result. It shall require that handler but no policy default direction. The default-direction marker constructor shall instead use Policy::ROUND_DEFAULT_CONSTRUCTOR and deliver the result exactly once to that same handler. Assignment from a marker shall use Policy::ROUND_DEFAULT_OPERATOR, deliver its result exactly once to the handler and return a reference to the destination if the handler returns. An assignment default shall not be required merely to construct an object, nor a constructor default merely to assign to a live object.

Numerical payloads, supported/unsupported classes, representability flags and admitted directions shall follow 🔗 1. Typed special-marker assignment to native integer storage, 🔗 2. Typed special-marker assignment to GMP integer and rational storage or 🔗 4. Typed special-value assignment to native floating-point storage according to storage. In particular, supported NaN representation shall not produce a false unrepresentability flag. A NaN marker shall retain an empty ordered relation and shall not admit ROUND_NOT_NEEDED. Handler acceptance shall not turn an unsupported numerical result into a represented number: such an accepted object shall remain reusable as a destination, without inspecting its unspecified payload.

A handler exception shall propagate. Failed construction shall not leave a completed destination object; already constructed members shall have normal C++ cleanup. If assignment's handler throws, the destination shall remain live and reusable but need not retain its old payload. No strong assignment rollback shall be required. Marker sources shall remain unchanged. Underlying object ownership and cleanup shall follow 🔗 1. Finite checked scalar storage and copying.

Object access overlapping mutation shall be synchronized, and resources shall suffice for underlying objects. Calls shall require no library initialization, coefficient-constant stage or FPU setup and shall preserve hardware direction. Unavailable floating-point formats shall not be instantiated. Native floating-point exception/status conditions shall follow 🔗 4. Typed special-value assignment to native floating-point storage.