std::literals::complex_literals::operator""i, operator""if, operator""il

< cpp‎ | numeric‎ | complex

C++
 Language Standard library headers Concepts Utilities library Strings library Containers library Algorithms library Iterators library Numerics library Input/output library Localizations library Regular expressions library (C++11) Atomic operations library (C++11) Thread support library (C++11)

Numerics library
 Common mathematical functions Floating-point environment Complex numbers Numeric arrays Pseudo-random number generation Compile-time rational arithmetic (C++11) Generic numeric operations iota (C++11) accumulate inner_product adjacent_difference partial_sum

std::complex
Member functions
Non-member functions
 real imag abs arg norm conj proj (C++11) polar operator""ioperator""ifoperator""il (C++14)(C++14)(C++14)
Exponential functions
Power functions
Trigonometric functions
 asin (C++11) acos (C++11) atan (C++11)
Hyperbolic functions
 asinh (C++11) acosh (C++11) atanh (C++11)

 Defined in header constexpr complex operator""i(long double arg); constexpr complex operator""i(unsigned long long arg); (1) (since C++14) constexpr complex operator""if(long double arg); constexpr complex operator""if(unsigned long long arg); (2) (since C++14) constexpr complex operator""il(long double arg); constexpr complex operator""il(unsigned long long arg); (3) (since C++14)

Forms a std::complex literal representing an imaginary number.

1) forms a literal std::complex<double> with the real part zero and imaginary part arg
2) forms a literal std::complex<float> with the real part zero and imaginary part arg
3) forms a literal std::complex<long double> with the real part zero and imaginary part arg

Contents

Parameters

 arg - the value of the imaginary number

Return value

The std::complex literal with the real part zero and imaginary part arg