提交 07bb4139 编写于 作者: Y Yu Yang

Revert changes

上级 da757696
......@@ -110,10 +110,6 @@ class Vector {
T* end() { return size() == 0 ? &EmptyDummy() : &this->operator[](size()); }
const T* cbegin() const { return begin(); }
const T* cend() const { return end(); }
T& front() { return *begin(); }
T& back() {
......@@ -125,10 +121,15 @@ class Vector {
const T* begin() const {
return size() == 0 ? &EmptyDummy() : &this->operator[](0);
}
const T* end() const {
return size() == 0 ? &EmptyDummy() : &this->operator[](size());
}
const T* cbegin() const { return begin(); }
const T* cend() const { return end(); }
const T& back() const {
auto it = end();
--it;
......@@ -244,10 +245,8 @@ class Vector {
// implicit cast operator. Vector can be cast to std::vector implicitly.
operator std::vector<T>() const {
std::vector<T> result;
if (size() != 0) {
result.resize(size());
std::copy(begin(), end(), result.begin());
}
return result;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册