[PATCH] D27314: Replace AlignedCharArrayUnion maxed arity with a variadic template
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 1 12:00:50 PST 2016
zturner added inline comments.
================
Comment at: llvm/include/llvm/Support/AlignOf.h:38-40
+ return (max_alignof<T0>() > max_alignof<T1, Ts...>())
+ ? max_alignof<T0>()
+ : max_alignof<T1, Ts...>();
----------------
How about
```
constexpr size_t lhs = max_alignof<T0>();
constexpr size_t rhs = max_alignof<T1, Ts...>();
return std::max(lhs, rhs);
```
https://reviews.llvm.org/D27314
More information about the llvm-commits
mailing list