0

I see this code in C++ STL, and I don't really know why is ((void)Pred, true)... valid in C++, I never have seen this kind of code.

template <bool... Pred>
struct all_helper {};

#include <type_traits>
template <bool... Pred>
using all = std::_IsSame<all_helper<Pred...>, all_helper<((void)Pred, true)...>>;
LunarEclipse
  • 661
  • 1
  • 4
  • 14

0 Answers0