示例#1
0
inline _4dArray<T> &_4dArray<T>::operator=(const _4dArray &rhs) {
  if (&rhs != this) {
    set_size(rhs.m_extents[0], rhs.m_extents[1], rhs.m_extents[2],
             rhs.m_extents[3]);
    std::copy(rhs.begin(), rhs.end(), m_storage);
  }
  return *this;
}
示例#2
0
template <typename T> inline _4dArray<T>::_4dArray(const _4dArray &other) {
  init_memory(other.m_extents[0], other.m_extents[1], other.m_extents[2],
              other.m_extents[3]);
  std::copy(other.begin(), other.end(), m_storage);
}