Can I make an assumption that given
std::string str; ... // do something to str
Is the following statement is always true?
Yes it is equivalent but allows the core code to change the implementation of what empty() actually means depending on OS/Hardware/anything and not affect your code at all. There is similiar practice in Java and .NET