[PATCH] D49402: [STLExtras] Add size() for arrays

Paul Semel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 17 05:10:52 PDT 2018


paulsemel added inline comments.


================
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:
> > 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).
Ok I will add it in the comment ::)


Repository:
  rL LLVM

https://reviews.llvm.org/D49402





More information about the llvm-commits mailing list