Namespaces
Variants
Views
Actions

Talk:cpp/language/integer literal

From cppreference.com

What is "maximal munch" mentioned in the last paragraph of Notes? 37.98.245.58 23:54, 11 March 2018 (PDT)

It means the scanner forms the longest possible token. It is not a typo. --LittleFlower (talk) 02:34, 12 March 2018 (PDT)

[edit] signed size_t vs. ptrdiff_t

Hi, in this article the type associated with the literal z is called "the signed version of std::size_t". Isn't that the same as std::ptrdiff_t? -- 2.203.127.68 10:53, 23 March 2021 (PDT)

not necessarily: compare to std::printf, where %zu prints a size_t, %zd prints this "signed version of size_t", %td prints ptrdiff_t and %tu prints the "unsigned version of ptrdiff_t. --Cubbi (talk) 11:29, 23 March 2021 (PDT)
OK. They obviously seems to differ. I'm wondering what possible reasons exist for diverging the sizes of this types. -- 2.203.127.68 13:22, 23 March 2021 (PDT)