std::get(std::complex)(3)
β¨ NAME β¨
std::get(std::complex) β literally std::get(std::complex) π«Ά
Okay bestie, you're looking at std::get(std::complex)(3) from the C++ Standard Libary manual, and it's giving tiny-accessor-with-main-character-energy β¨.
πΈ 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 );
So what's the vibe? It returns a reference to the real or imaginary part from a complex when I == 0 or I == 1, respectively. It is mainly provided for structured binding support. No cap π
.
π Parameters π
xβ a complex.
π Return value π
- 1-4) β A reference to the real or imaginary part from the stored one when
I == 0orI == 1, respectively. π₯
π Example π
This section is incomplete Reason: no example
The docs are literally saying "no example yet" π β iconic honesty, honestly.
π¦ 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 π·οΈ
- Category: Todo no example
Okay that's the whole vibe π« Source: http://cppreference.com Β· version/date: 2024.06.10 Β· page: std::get(std::complex)(3). Stay iconic, bestie π
β¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms