What’s the C++ suffix for long double literals?

From the C++ Standard

The type of a floating literal is double unless explicitly specified
by a suffix. The suffixes f and F specify float, the suffixes l and L
specify long double.

It is interesting to compare with corresponding paragraph of the C Standard. In C there is used term floating constant instead of floating literal in C++:

4 An unsuffixed floating constant has type double. If suffixed by the letter f or F, it has type float. If suffixed by the letter l or L, it has type long double

Leave a Comment