[PATCH] D49402: [STLExtras] Add size() for arrays
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 17 03:52:10 PDT 2018
jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.
LGTM. But I'd like somebody else to chip in on this as well before you commit. If nobody else does in the next couple of days, go ahead and commit.
================
Comment at: include/llvm/ADT/STLExtras.h:1041
+template <class T, std::size_t N>
+constexpr size_t size(const T (&array)[N]) noexcept {
----------------
jhenderson wrote:
> jhenderson wrote:
> > You're being inconsistent with your use of "std" here. Unfortunately, so is this entire file, so I can't say what is the preferred way, but at least make sure to use only one form in this function!
> Please add a comment, like the rest of the functions around here.
Thinking about it, you might want to say that this is identical to C++17's version (see similar comments around make_unique below).
Repository:
rL LLVM
https://reviews.llvm.org/D49402
More information about the llvm-commits
mailing list