Exemplo n.º 1
0
inline _3dArray<T> &_3dArray<T>::operator=(const _3dArray &rhs) {
  if (&rhs != this) {
    set_size(rhs.m_extents[0], rhs.m_extents[1], rhs.m_extents[2]);
    std::copy(rhs.begin(), rhs.end(), m_storage);
  }
  return *this;
}
Exemplo n.º 2
0
template <typename T> inline _3dArray<T>::_3dArray(const _3dArray &other) {
  if (!other.is_empty()) {
    init_memory(other.m_extents[0], other.m_extents[1], other.m_extents[2]);
    std::copy(other.begin(), other.end(), m_storage);
  } else
    init_empty();
}