Skip to content

Commit

Permalink
Added assignment operators
Browse files Browse the repository at this point in the history
  • Loading branch information
nliber committed Feb 5, 2025
1 parent 1c74a26 commit d439944
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/source/API/core/utilities/complex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Interface

.. cppkokkos:type:: value_type = T
.. rubric:: Constructors
.. rubric:: Constructors & Assignment Operators

.. cppkokkos:function:: complex()
Expand All @@ -47,13 +47,24 @@ Interface
Constraints: ``U`` is convertible to ``T``.

.. cppkokkos:function:: complex(std::complex<T> z) noexcept
.. cppkokkos:function:: complex& operator=(std::complex<T> z) noexcept
Implicit conversion from ``std::complex`` initializes the real component to ``z.real()`` and the imaginary component to ``z.imag()``.

.. cppkokkos:function:: constexpr complex(T r) noexcept
.. cppkokkos:function:: constexpr complex& operator=(T r) noexcept
Initializes the real component to ``r`` and zero initializes the imaginary component.

.. cppkokkos:function:: constexpr complex(T r, T i) noexcept
Initializes the real component to ``r`` and the imaginary component to ``i``.

.. deprecated:: 4.x.x
.. cppkokkos:function:: void operator=(const complex&) volatile noexcept
.. cppkokkos:function:: volatile complex& operator=(const volatile complex&) volatile noexcept
.. cppkokkos:function:: complex& operator=(const volatile complex&) noexcept
.. cppkokkos:function:: void operator=(const volatile T&) noexcept
.. cppkokkos:function:: void operator=(const T&) volatile noexcept
Note: These have templated implementations so as not to be copy assignment operators

0 comments on commit d439944

Please sign in to comment.