VCCC  2024.05
VisualCamp Common C++ library
to_array.hpp File Reference
#include <array>
#include <cstddef>
#include <type_traits>
#include <utility>

Go to the source code of this file.

Namespaces

 vccc
 

Functions

template<typename T , std::size_t N, std::enable_if_t< std::is_constructible< T, T & >::value &&!std::is_array< T >::value, int > = 0>
constexpr std::array< std::remove_cv_t< T >, N > to_array (T(&a)[N])
 
template<typename T , std::size_t N, std::enable_if_t< std::is_move_constructible< T >::value &&!std::is_array< T >::value, int > = 0>
constexpr std::array< std::remove_cv_t< T >, N > to_array (T(&&a)[N])