Scroll to navigation

std::get(std::complex)(3) C++ Standard Libary std::get(std::complex)(3)

NAME

std::get(std::complex) - std::get(std::complex)

Synopsis


Defined in header <complex>
template< std::size_t I > (1) (since C++26)
friend constexpr T& get( std::complex<T>& x );
template< std::size_t I > (2) (since C++26)
friend constexpr const T& get( const std::complex<T>& x );
template< std::size_t I > (3) (since C++26)
friend constexpr T&& get( std::complex<T>&& x );
template< std::size_t I > (4) (since C++26)
friend constexpr const T&& get( const std::complex<T>&& x );


Returns the reference to real or imaginary part from a complex when I == 0 or I ==
1, respectively. It is mainly provided for structured binding support.

Parameters


x - a complex

Return value


1-4) A reference to the real or imaginary part from the stored one when I == 0 or I
== 1, respectively.

Example


This section is incomplete
Reason: no example

See also


Structured binding (C++17) binds the specified names to sub-objects or tuple
elements of the initializer
get(std::tuple) tuple accesses specified element
(C++11) (function template)
get(std::pair) accesses an element of a pair
(C++11) (function template)
get(std::array) accesses an element of an array
(C++11) (function template)

Category:


* Todo no example

2024.06.10 http://cppreference.com