mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
This implements P3886R0: Wording for AT1-057, by defining the __cpp_lib_replaceable_contract_violation_handler. The macro is defined only if contracts are supported (i.e. under same conditions as __cpp_lib_contracts). GCC supports providing custom violation handler by providing an separate defintion of handle_contract_violation. This is supported on the targets that uses ELF format, so the macro is defined for with non-zero value for them. libstdc++-v3/ChangeLog: * include/bits/version.def (replaceable_contract_violation_handler) [(__cplusplus > 202302L) && (__cpp_contracts >= 202502L)]: Define to 202603 for ELF targets, and 0 otherwise. * include/bits/version.h: Regenerate. * include/std/contracts: Define __cpp_lib_replaceable_contract_violation_handler. Reviewed-by: Jonathan Wakely <jwakely@redhat.com> Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>