#ifndef COSMOPOLITAN_THIRD_PARTY_LIBCXX_COUNTOF_H_ #define COSMOPOLITAN_THIRD_PARTY_LIBCXX_COUNTOF_H_ #include "third_party/libcxx/__config" namespace { template inline _LIBCPP_CONSTEXPR size_t countof(const T (&)[N]) { return N; } template inline _LIBCPP_CONSTEXPR size_t countof(const T* const begin, const T* const end) { return static_cast(end - begin); } } // namespace #endif /* COSMOPOLITAN_THIRD_PARTY_LIBCXX_COUNTOF_H_ */