diff --git a/vector/data/one/code.cpp b/vector/data/one/code.cpp index 8aa982d..d1bfd2f 100644 --- a/vector/data/one/code.cpp +++ b/vector/data/one/code.cpp @@ -125,6 +125,8 @@ void TestErase() int main(int argc, char const *argv[]) { + std::vector vvv; + vvv.pop_back(); TestConstructor(); TestIterators(); TestAccessingMethod(); diff --git a/vector/src/vector.hpp b/vector/src/vector.hpp index ac03102..5a2d88a 100644 --- a/vector/src/vector.hpp +++ b/vector/src/vector.hpp @@ -16,7 +16,7 @@ namespace sjtu { */ template class vector { - std::allocator alloc; + static std::allocator alloc; size_t allocated_length; size_t current_length; T *raw_beg, *raw_end; @@ -504,6 +504,8 @@ class vector { } } }; +template +std::allocator vector::alloc; } // namespace sjtu