Quick Links: |
Provide functionality of the corresponding C++ Standard header. More...
<bsl_complex.h>
directly. This component imports symbols declared in the <complex> header file implemented in the standard library provided by the compiler vendor. bsl::complex
objects with various ranges of values. The ud-suffixes are preceded with the _
symbol to distinguish between the bsl
-complex's UDLs and the std
-complex's UDLs introduced in the C++14 standard and implemented in the standard library. Note that bsl
-complex's UDLs, unlike the std
-complex's UDLs, can be used in a client's code if the current compiler supports the C++11 standard. bsl
-complex's UDL operators are declared in the bsl::literals::complex_literals
namespace, where literals
and complex_literals
are inline namespaces. Access to these operators can be gained with either using namespace bsl::literals
, using namespace bsl::complex_literals
or using namespace bsl::literals::complex_literals
. But we recommend using namespace bsl::complex_literals
to minimize the scope of the using declaration. bsl
-complex's UDLs. using namespace bsl::complex_literals;
bsl::complex
object z
. auto z = 1.0 + 1_i;
z
to stdout
: printf("abs(%.1f,%.1f) = %f\n", z.real(), z.imag(), bsl::abs(z));
stdout
: abs(1.0,1.0) = 1.414214