How it is different? That is clearly spelled out. It returns the size as a signed integer.
What problem does it solve? Also spelled out. It makes operating with indices a lot easier (as long as you stick with the signed integer domain). Although from the language perspective, the reason why it was added was consistency.
Which what the example is demonstrating.
What exactly would you add comments to in this code?
How is it different that std::size in function and intent? What problem does it solve? What is the example trying to demonstrate? No code comments?
OK, I will entertain you.
How it is different? That is clearly spelled out. It returns the size as a signed integer.
What problem does it solve? Also spelled out. It makes operating with indices a lot easier (as long as you stick with the signed integer domain). Although from the language perspective, the reason why it was added was consistency.
Which what the example is demonstrating.
What exactly would you add comments to in this code?