@@ -23,34 +23,31 @@ automatically adapt their behavior based on compiler capabilities:
2323
2424* When C++26 native contracts are available (``__cpp_contracts `` defined),
2525 they map to standard contract syntax
26- * When contracts are not available but ``HPX_WITH_CONTRACTS=ON ``, preconditions
27- and postconditions become no-ops while contract assertions fall back to
28- :c:macro: `HPX_ASSERT ` for compatibility
29- * When ``HPX_WITH_CONTRACTS=OFF ``, preconditions and postconditions become
26+ * When ``HPX_WITH_CX26_CONTRACTS=OFF ``, preconditions and postconditions become
3027 no-ops while contract assertions remain available as enhanced assertions
3128
3229Configuration
3330=============
3431
3532Enable contracts in CMake::
3633
37- cmake -DHPX_WITH_CONTRACTS =ON -DCMAKE_CXX_STANDARD=26
34+ cmake -DHPX_WITH_CXX26_CONTRACTS =ON -DCMAKE_CXX_STANDARD=26
3835
3936Enable contract-enhanced assertions (optional)::
4037
41- cmake -DHPX_WITH_CONTRACTS =ON -DHPX_WITH_ASSERTS_AS_CONTRACT_ASSERTS =ON
38+ cmake -DHPX_WITH_CXX26_CONTRACTS =ON -DHPX_CONTRACTS_WITH_ASSERTS_AS_CONTRACT_ASSERTS =ON
4239
4340Contract assertions work even when contracts are disabled::
4441
45- cmake -DHPX_WITH_CONTRACTS =OFF # HPX_CONTRACT_ASSERT still maps to HPX_ASSERT
42+ cmake -DHPX_WITH_CXX26_CONTRACTS =OFF # HPX_CONTRACT_ASSERT still maps to HPX_ASSERT
4643
4744Advanced Features
4845=================
4946
5047Contract-Enhanced Assertions
5148----------------------------
5249
53- When ``HPX_WITH_ASSERTS_AS_CONTRACT_ASSERTS =ON `` is enabled, regular
50+ When ``HPX_CONTRACTS_WITH_ASSERTS_AS_CONTRACT_ASSERTS =ON `` is enabled, regular
5451:c:macro: `HPX_ASSERT ` calls are automatically upgraded to use contract
5552assertions in C++26 mode::
5653
@@ -63,17 +60,16 @@ assertions in C++26 mode::
6360.. warning ::
6461 Enhanced assertions only provide benefits when native C++26 contracts are
6562 supported by the compiler. Without native contract support,
66- ``HPX_ASSERT `` → ``HPX_CONTRACT_ASSERT `` → ``HPX_ASSERT `` (no enhancement).
63+ ``HPX_ASSERT `` -> ``HPX_CONTRACT_ASSERT `` -> ``HPX_ASSERT `` (no enhancement).
6764 CMake will issue a warning if you enable this option without native contract support.
6865
6966This provides enhanced contract semantics throughout your existing codebase
7067without requiring changes to assertion code. The transformation occurs in the
7168contracts module (``contracts.hpp ``) where the ``HPX_ASSERT `` macro is
7269overridden to use ``HPX_CONTRACT_ASSERT `` when ``HPX_WITH_ASSERTS_AS_CONTRACT_ASSERTS=ON ``:
7370
74- * ``HPX_WITH_CONTRACTS=ON `` - Contracts module is enabled
75- * ``HPX_WITH_ASSERTS_AS_CONTRACT_ASSERTS=ON `` - Assertion enhancement is enabled
76- * ``HPX_HAVE_NATIVE_CONTRACTS=ON `` - C++26 native contracts are available (from config test)
71+ * ``HPX_WITH_CXX26_CONTRACTS=ON `` - Contracts module is enabled
72+ * ``HPX_CONTRACTS_WITH_ASSERTS_AS_CONTRACT_ASSERTS=ON `` - Assertion enhancement is enabled
7773
7874The implementation works by redefining ``HPX_ASSERT `` in ``contracts.hpp `` to
7975use ``HPX_CONTRACT_ASSERT ``, which automatically adapts to the current contract
@@ -155,4 +151,4 @@ detection. Tests are organized into three categories:
155151The test suite automatically detects compiler capabilities at configure time
156152and builds only the appropriate tests for the current configuration.
157153
158- See the :ref: `API reference <modules_contracts_api >` of the module for more details.
154+ See the :ref: `API reference <modules_contracts_api >` of the module for more details.
0 commit comments