problem understanding a paragraph in c++ primer

A decimal literal has the smallest type of int, long, or long long

(i.e., the first type in this list) in which the literal’s value fits. Octal

and hexadecimal literals have the smallest type of int, unsigned int, long,

unsigned long,long long, or unsigned long long in which the literal’s value

fits.

I do not understand this paragraph in the book c++ primer fifth edition

thanks in advance
When you write a number directly into your code, for example like this:

auto x = 17;

that value 17 is a "decimal literal".

What type is it? Is it an int? Is it a long? Is it a long long? It's an int if that number can fit in an int, but if it can' then it's a long, and if it doesn't even fit in a long, it's a long long.

Note this isn't about what type x is in my code example; it's about what the number 17 is treated as.
eg. literal 123456789012

a. Can the value 123456789012 be represented by an int? If yes, the type is int
b. If not, can the value 123456789012 be represented by a long? If yes, the type is long
c. If not, can the value 123456789012 be represented by a long long? If yes, the type is long long
d. If not, it is an error.
thank you very much for the quick reply, now I understand.
Topic archived. No new replies allowed.