[simd.complex.access] (original) (raw)

29 Numerics library [numerics]

29.10 Data-parallel types [simd]

29.10.7 Class template basic_vec [simd.class]

29.10.7.4 Complex accessors [simd.complex.access]

constexpr _real-type_ real() const noexcept;constexpr _real-type_ imag() const noexcept;

Returns: An object of type real-type_where the element is initialized to the result of_cmplx-func(​operator[](i)) for all i in the range [0, size()), where _cmplx-func_ is the corresponding function from .

constexpr void real(const _real-type_& v) noexcept;constexpr void imag(const _real-type_& v) noexcept;

Effects: Replaces each element of the basic_vec object such that the element is replaced with value_type(v[i],operator[](i).imag()) or value_type(operator[](i).real(), v[i])for real and imag respectively, for all i in the range [0, size()).