This is intended to replace ArrayRef.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Where do you use enable_if? data_ is libc coding conventions? It is not conforming to the LLVM coding conventions.
libc/src/__support/CPP/span.h | ||
---|---|---|
83 |
Did you meant camelCase for dynamic_extent? |
libc/src/__support/CPP/span.h | ||
---|---|---|
83 | I think s/countToSize/count_to_size/ |
libc/src/__support/CPP/span.h | ||
---|---|---|
83 | It was count_to_size (snake case) originally and I thought @tschuett asked me to go to camelCase. Then I figured out that the modifications I made to the file probably messed out with the lines on which the comment was attached (Phabricator... sigh). I inferred that it was probably dynamic_extent that was the culprit rather than count_to_size. But now I'm confused😅 |
libc/src/__support/CPP/span.h | ||
---|---|---|
83 | I am also confused. Normal LLVM conventions do not apply in the libc directory, and the cpp namespace is even more special. So, I think count_to_size is correct. Likewise Data and Size are also not compliant. We can go with span_data and span_size to disambiguate with the methods data and size. |
https://llvm.org/docs/CodingStandards.html#id43
"As an exception, classes that mimic STL classes can have member names in STL’s style of lower-case words separated by underscores (e.g. begin(), push_back(), and empty()). Classes that provide multiple iterators should add a singular prefix to begin() and end() (e.g. global_begin() and use_begin())."
Nit: You may use nested namespaces.