v8 12.4.254 (node 22.4.1)
V8 is Google's open source JavaScript engine
Loading...
Searching...
No Matches
v8::detail Namespace Reference

Functions

template<class T , std::size_t N, std::size_t... I>
constexpr std::array< std::remove_cv_t< T >, N > to_array_lvalue_impl (T(&a)[N], std::index_sequence< I... >)
 
template<class T , std::size_t N, std::size_t... I>
constexpr std::array< std::remove_cv_t< T >, N > to_array_rvalue_impl (T(&&a)[N], std::index_sequence< I... >)
 

Detailed Description

Helper function template to create an array of fixed length, initialized by the provided initializer list, without explicitly specifying the array size, e.g.

auto arr = v8::to_array<Local<String>>({v8_str("one"), v8_str("two")});

In the future, this may be replaced with or aliased to std::to_array (under consideration for C++20).

Function Documentation

◆ to_array_lvalue_impl()

template<class T , std::size_t N, std::size_t... I>
constexpr std::array< std::remove_cv_t< T >, N > to_array_lvalue_impl ( T(&)  a[N],
std::index_sequence< I... >   
)
constexpr

Definition at line 174 of file v8-memory-span.h.

Referenced by v8::to_array().

◆ to_array_rvalue_impl()

template<class T , std::size_t N, std::size_t... I>
constexpr std::array< std::remove_cv_t< T >, N > to_array_rvalue_impl ( T(&&)  a[N],
std::index_sequence< I... >   
)
constexpr

Definition at line 180 of file v8-memory-span.h.

Referenced by v8::to_array().