std::string::max_size() as static member

前端 未结 1 809
不思量自难忘°
不思量自难忘° 2021-01-18 11:29

Why isn\'t max_size a static member of std::string?

This compiles but I think its strange that a property common to all strings can only be

相关标签:
1条回答
  • 2021-01-18 11:55

    Why isn't max_size a static member of std::string?

    Because max_size return value depends on the allocator instance that the string instance uses internally.

    0 讨论(0)
提交回复
热议问题