Value concepts ============== .. contents:: Table of Contents :local: .. _concept-Value: Value ----- Let `Val` be a type that models :ref:`Value (details) `. Then `Val` also models :ref:`SemiregularValue ` .. _concept-Value-expressions: .. rubric:: Expressions Let `Val` inherit all valid expressions defined for :ref:`SemiregularValue `. .. _concept-SemiregularValue: SemiregularValue ---------------- Let `SemiregVal` be a type that models :ref:`SemiregularValue (details) `. Then `SemiregVal` also models : :ref:`Semiregular (fundamentals) `. .. _concept-SemiregularValue-expressions: .. rubric:: Expressions Let : - ``val`` be an instance of `SemiregVal`. - ``val_cpy`` be an instance of `SemiregVal`. - ``cval`` be an instance of `const SemiregVal`. Then we have the following valid expressions : +-------------------------+--------------------+---------------+----------------+---------------------------------------------------+ | Expression | Return type | Pre-condition | Post-condition | Description | +=========================+====================+===============+================+===================================================+ | ``val()`` | `SemiregVal` | none | none | Constructs a value ``val`` of type `SemiregVal` | +-------------------------+--------------------+---------------+----------------+---------------------------------------------------+ | ``cval()`` | `const SemiregVal` | none | none | Constructs a value ``cval`` of type `SemiregVal` | +-------------------------+--------------------+---------------+----------------+---------------------------------------------------+ | ``val_cpy(val)`` | `SemiregVal` | none | none | Copy-constructs a value ``val_cpy`` from ``val`` | +-------------------------+--------------------+---------------+----------------+---------------------------------------------------+ | ``val_cpy(cval)`` | `SemiregVal` | none | none | Copy-constructs a value ``val_cpy`` from ``cval`` | +-------------------------+--------------------+---------------+----------------+---------------------------------------------------+ | ``val_cpy(move(val))`` | `SemiregVal` | none | none | Move-constructs a value ``val_cpy`` from ``val`` | +-------------------------+--------------------+---------------+----------------+---------------------------------------------------+ | ``val_cpy = val`` | `SemiregVal&` | none | none | Assign ``val`` to ``val_cpy`` | +-------------------------+--------------------+---------------+----------------+---------------------------------------------------+ | ``val_cpy = cval`` | `SemiregVal&` | none | none | Assign ``cval`` to ``val_cpy`` | +-------------------------+--------------------+---------------+----------------+---------------------------------------------------+ | ``val_cpy = move(val)`` | `SemiregVal&` | none | none | Move-assign ``val`` to ``val_cpy`` | +-------------------------+--------------------+---------------+----------------+---------------------------------------------------+ .. _concept-RegularValue: RegularValue ------------ Let `RegVal` be a type that models :ref:`RegularValue (details) `. Let `RegVal` also models :ref:`SemiregularValue ` and :ref:`Regular (fundamentals) `. .. _concept-RegularValue-expressions: .. rubric:: Expressions Let `RegVal` inherit all valid expressions defined for :ref:`SemiregularValue `. Let : - ``lhs`` be an instance of `const RegVal`. - ``rhs`` be an instance of `const RegVal`. Then we have the following valid expressions : +----------------+-------------+---------------+----------------+-----------------------------------------+ | Expression | Return type | Pre-condition | Post-condition | Description | +================+=============+===============+================+=========================================+ | ``lhs == rhs`` | `bool` | none | none | Compare wether two values are equal | +----------------+-------------+---------------+----------------+-----------------------------------------+ | ``lhs != rhs`` | `bool` | none | none | Compare wether two values are different | +----------------+-------------+---------------+----------------+-----------------------------------------+ | ``rhs == rhs`` | `bool` | none | none | Compare wether two values are equal | +----------------+-------------+---------------+----------------+-----------------------------------------+ | ``rhs != rhs`` | `bool` | none | none | Compare wether two values are different | +----------------+-------------+---------------+----------------+-----------------------------------------+ .. _concept-StrictTotallyOrderedRegularValue: StrictTotallyOrderedRegularValue -------------------------------- Let `STORegVal` be a type that models :ref:`StrictTotallyOrderedRegularValue (details) `. Let `STORegVal` also models :ref:`RegularValue ` and :ref:`StrictTotallyOrdered (fundamentals) `. .. _concept-StrictTotallyOrderedRegularValue-expressions: .. rubric:: Expressions Let `STORegVal` inherit all valid expressions defined for :ref:`RegularValue `. Let : - ``lhs`` be an instance of `const STORegVal`. - ``rhs`` be an instance of `const STORegVal`. Then we have the following valid expressions : +----------------+-------------+---------------+----------------+---------------------------------+ | Expression | Return type | Pre-condition | Post-condition | Description | +================+=============+===============+================+=================================+ | ``lhs < rhs`` | `bool` | none | none | Compare order of the two values | +----------------+-------------+---------------+----------------+---------------------------------+ | ``lhs > rhs`` | `bool` | none | none | Compare order of the two values | +----------------+-------------+---------------+----------------+---------------------------------+ | ``lhs <= rhs`` | `bool` | none | none | Compare order of the two values | +----------------+-------------+---------------+----------------+---------------------------------+ | ``lhs >= rhs`` | `bool` | none | none | Compare order of the two values | +----------------+-------------+---------------+----------------+---------------------------------+