ThePhD / future_cxx

Work done today for the glory of tomorrow - or, C and C++ systems programming papers.
https://thephd.dev/portfolio/standard
48 stars 8 forks source link

p1378: Errors in std::basic_string_literal<CharType, N>::size() #2

Closed aTom3333 closed 5 years ago

aTom3333 commented 5 years ago

Hello, I read the P1378 paper and I believe I found an error in the [support.stringlit] section where the size method is defined: N is the template parameter defined as the size of the string including the null terminator, so I believe the size() method in meant to return N-1 instead of N for coherency with other string types and post condition given in the default constructor "Ensures: size() == 0 and *end() == '\0'." where N has to be 1 for arr to be able to hold '\0' but size() is expected to return 0.

ps: I don't know if opening a github issue is the way to report errors as I'm not used to it, let me know if it is not the case.

ThePhD commented 5 years ago

This is VASTLY preferred as a method of reporting issues, because it doesn't get lost in my e-mail and ACTUALLY gets tracked, WEW!

Thanks for reporting; I'll get right on it.

ThePhD commented 5 years ago

(You can always send me an e-mail too, if Github isn't an option.)

ThePhD commented 5 years ago

This is fixed now.