1 #ifndef FWCore_Utilities_interface_propagate_const_array_h 2 #define FWCore_Utilities_interface_propagate_const_array_h 13 #include <type_traits> 25 template <
typename,
typename =
void>
35 template <
typename T,
typename =
void,
typename =
void>
44 template <
typename T,
int N>
51 struct subscript_type<
T,
std::enable_if_t<not std::is_array_v<T>>, std::enable_if_t<has_subscript_operator_v<T>>> {
52 using type =
typename std::remove_reference<decltype(std::declval<T&>()[0])>
::type;
90 static_assert(std::is_convertible_v<std::decay_t<U>, std::decay_t<T>>,
91 "Cannot assign propagate_const_array<> of incompatible types");
106 constexpr
operator element_type const *()
const {
return this->
get(); }
119 template <
typename T>
124 template <
typename T>
131 #endif // FWCore_Utilities_interface_propagate_const_array_h constexpr element_type & operator[](std::ptrdiff_t pos)
typename subscript_type< T >::type subscript_type_t
constexpr propagate_const_array()=default
std::decay_t< T > m_value
constexpr propagate_const_array< T > & operator=(propagate_const_array &&)=default
constexpr propagate_const_array & operator=(U &&u)
constexpr T & get_underlying(propagate_const< T > &)
typename std::remove_reference< decltype(std::declval< T & >()[0])>::type type
constexpr auto has_subscript_operator_v
constexpr propagate_const_array & operator=(propagate_const_array< U > &other)
typename impl::subscript_type_t< cms::cuda::device::unique_ptr< double[]> > element_type
constexpr propagate_const_array(U &&u)
constexpr element_type const & operator[](std::ptrdiff_t pos) const