CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes | Friends
edm::propagate_const_array< T > Class Template Reference

#include <propagate_const_array.h>

Public Types

using element_type = typename impl::subscript_type_t< T >
 

Public Member Functions

constexpr element_type const * get () const
 
constexpr element_typeget ()
 
constexpr operator element_type * ()
 
constexpr operator element_type const * () const
 
constexpr propagate_const_array< T > & operator= (propagate_const_array &&)=default
 
propagate_const_array< T > & operator= (propagate_const_array< T > const &)=delete
 
template<typename U >
constexpr propagate_const_arrayoperator= (propagate_const_array< U > &other)
 
template<typename U >
constexpr propagate_const_arrayoperator= (U &&u)
 
constexpr element_type const & operator[] (std::ptrdiff_t pos) const
 
constexpr element_typeoperator[] (std::ptrdiff_t pos)
 
constexpr propagate_const_array ()=default
 
constexpr propagate_const_array (propagate_const_array< T > &&)=default
 
 propagate_const_array (propagate_const_array< T > const &)=delete
 
template<typename U >
constexpr propagate_const_array (U &&u)
 

Private Attributes

std::decay_t< Tm_value
 

Friends

constexpr std::decay_t< T > & get_underlying (propagate_const_array< T > &)
 
constexpr std::decay_t< T > const & get_underlying (propagate_const_array< T > const &)
 
template<typename U >
class propagate_const_array
 

Detailed Description

template<typename T>
class edm::propagate_const_array< T >

Definition at line 61 of file propagate_const_array.h.

Member Typedef Documentation

◆ element_type

template<typename T>
using edm::propagate_const_array< T >::element_type = typename impl::subscript_type_t<T>

Definition at line 77 of file propagate_const_array.h.

Constructor & Destructor Documentation

◆ propagate_const_array() [1/4]

template<typename T>
constexpr edm::propagate_const_array< T >::propagate_const_array ( )
default

◆ propagate_const_array() [2/4]

template<typename T>
constexpr edm::propagate_const_array< T >::propagate_const_array ( propagate_const_array< T > &&  )
default

◆ propagate_const_array() [3/4]

template<typename T>
edm::propagate_const_array< T >::propagate_const_array ( propagate_const_array< T > const &  )
delete

◆ propagate_const_array() [4/4]

template<typename T>
template<typename U >
constexpr edm::propagate_const_array< T >::propagate_const_array ( U &&  u)
inline

Definition at line 83 of file propagate_const_array.h.

83 : m_value(std::forward<U>(u)) {}

Member Function Documentation

◆ get() [1/2]

template<typename T>
constexpr element_type const* edm::propagate_const_array< T >::get ( ) const
inline

◆ get() [2/2]

template<typename T>
constexpr element_type* edm::propagate_const_array< T >::get ( )
inline

◆ operator element_type *()

template<typename T>
constexpr edm::propagate_const_array< T >::operator element_type * ( )
inline

Definition at line 112 of file propagate_const_array.h.

112 { return this->get(); }

◆ operator element_type const *()

template<typename T>
constexpr edm::propagate_const_array< T >::operator element_type const * ( ) const
inline

Definition at line 106 of file propagate_const_array.h.

106 { return this->get(); }

◆ operator=() [1/4]

template<typename T>
constexpr propagate_const_array<T>& edm::propagate_const_array< T >::operator= ( propagate_const_array< T > &&  )
default

◆ operator=() [2/4]

template<typename T>
propagate_const_array<T>& edm::propagate_const_array< T >::operator= ( propagate_const_array< T > const &  )
delete

◆ operator=() [3/4]

template<typename T>
template<typename U >
constexpr propagate_const_array& edm::propagate_const_array< T >::operator= ( propagate_const_array< U > &  other)
inline

Definition at line 89 of file propagate_const_array.h.

89  {
90  static_assert(std::is_convertible_v<std::decay_t<U>, std::decay_t<T>>,
91  "Cannot assign propagate_const_array<> of incompatible types");
92  m_value = other.m_value;
93  return *this;
94  }

◆ operator=() [4/4]

template<typename T>
template<typename U >
constexpr propagate_const_array& edm::propagate_const_array< T >::operator= ( U &&  u)
inline

Definition at line 97 of file propagate_const_array.h.

97  {
98  m_value = std::forward<U>(u);
99  return *this;
100  }

◆ operator[]() [1/2]

template<typename T>
constexpr element_type const& edm::propagate_const_array< T >::operator[] ( std::ptrdiff_t  pos) const
inline

Definition at line 104 of file propagate_const_array.h.

104 { return m_value[pos]; }

◆ operator[]() [2/2]

template<typename T>
constexpr element_type& edm::propagate_const_array< T >::operator[] ( std::ptrdiff_t  pos)
inline

Definition at line 110 of file propagate_const_array.h.

110 { return m_value[pos]; }

Friends And Related Function Documentation

◆ get_underlying [1/2]

template<typename T>
constexpr std::decay_t<T>& get_underlying ( propagate_const_array< T > &  iP)
friend

Definition at line 120 of file propagate_const_array.h.

120  {
121  return iP.m_value;
122  }

◆ get_underlying [2/2]

template<typename T>
constexpr std::decay_t<T> const& get_underlying ( propagate_const_array< T > const &  iP)
friend

Definition at line 125 of file propagate_const_array.h.

125  {
126  return iP.m_value;
127  }

◆ propagate_const_array

template<typename T>
template<typename U >
friend class propagate_const_array
friend

Definition at line 75 of file propagate_const_array.h.

Member Data Documentation

◆ m_value

template<typename T>
std::decay_t<T> edm::propagate_const_array< T >::m_value
private