#ifndef V8_BASE_TEMPLATE_META_PROGRAMMING_STRING_LITERAL_H_
#define V8_BASE_TEMPLATE_META_PROGRAMMING_STRING_LITERAL_H_
#include <algorithm>
#include "src/base/compiler-specific.h"
#include "src/base/logging.h"
namespace v8::base::tmp {
#ifdef HAS_CPP_CLASS_TYPES_AS_TEMPLATE_ARGS
#ifdef __cpp_lib_to_array
to_array;
#else
namespace detail {
template <typename T, size_t N, size_t... I>
constexpr std::array<std::remove_cv_t<T>, N> to_array_impl(
T (&a)[N], std::index_sequence<I...>) {
return {{a[I]...}};
}
}
template <typename T, size_t N>
constexpr std::array<std::remove_cv_t<T>, N> to_array(T (&a)[N]) {
return detail::to_array_impl(a, std::make_index_sequence<N>{});
}
#endif
template <size_t N>
class StringLiteral { … };
template <size_t N>
StringLiteral(const char (&)[N]) -> StringLiteral<N>;
#endif
}
#endif