Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
10.3 Clarify if narrower in the title refers the the rank of the essential type
#1
The rule 10.3 says:
Quote:The value of an expression shall not be assigned to an object with a narrower //essential type//

What does it mean to be narrower? To have a lower rank, or to have a smaller size?

For instance, on a platform where 
Code:
sizeof(long) == sizeof(long long)

Is the following code compliant with rule 10.3:
Code:
long l = 0;
long long ll = 0;
l = ll; // Compliant or not?

My feeling is that it is compliant, because the word rank is not used here, while it is explicitly used in other parts of the rule, but I'm not 100% confident.
Reply


Messages In This Thread
10.3 Clarify if narrower in the title refers the the rank of the essential type - by Loïc - 25-06-2026, 09:03 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)