No. | head File | Namespace | Literals | Explanation |
1 | <chrono> | std::literals::chrono_literals | h, min, s, ms, us, ns | 123s seconds |
2 | <string> | std::literals::string_literals | s | "Abc" s is a std :: string |
3 | <string_view> | std::literals::string_literals | en | |
4 | <complex> | std::literals::complex_literals | i, the, ow | 12.7i imaginary part, 1 + 2i is a complex number |
Complex constexpr < Double > operator "" I ( Long Double Arg) // literal definition of the imaginary part { return { 0 , Arg}; } Complex < Double > Z = 2.7 + 2 .3i;