Opened 3 years ago
Closed 3 years ago
#582 closed ожидаются исправления (задача сдана)
WW #11
Reported by: | yurko.andrej | Owned by: | Святослав Власов |
---|---|---|---|
Component: | WW_vector | Version: | 2.0 |
Keywords: | Cc: |
Description
Change History (4)
comment:1 Changed 3 years ago by
Type: | ожидается проверка → ожидаются исправления |
---|
comment:2 Changed 3 years ago by
Type: | ожидаются исправления → ожидается проверка |
---|---|
Version: | 1.0 → 2.0 |
comment:3 Changed 3 years ago by
Type: | ожидается проверка → ожидаются исправления |
---|
Опять ничего не собралось.
В следующий раз за несобирающиеся посылки буду ставить просто 0.
Во-первых, у тебя пачка ошибок вот такого типа:
include/my_vector_impl.h:50:18: error: catching polymorphic type ‘class std::exception’ by value [-Werror=catch-value=] 50 | catch (std::exception) {
И вот такие:
In file included from include/my_vector.h:47, from src/main.cpp:3: include/my_vector_impl.h: In instantiation of ‘T containers::my_vector<T>::operator[](std::size_t) const [with T = int; std::size_t = long unsigned int]’: src/main.cpp:315:25: required from ‘void test_index_operator() [with T = int]’ src/main.cpp:863:34: required from here include/my_vector_impl.h:173:10: error: invalid type argument of unary ‘*’ (have ‘int’) 173 | T ans = *array_[index]; | ^~~~~~~~ include/my_vector_impl.h: In instantiation of ‘T containers::my_vector<T>::operator[](std::size_t) const [with T = Product; std::size_t = long unsigned int]’: src/main.cpp:315:25: required from ‘void test_index_operator() [with T = Product]’ src/main.cpp:864:38: required from here include/my_vector_impl.h:173:10: error: no match for ‘operator*’ (operand type is ‘Product’) include/my_vector_impl.h: In instantiation of ‘T containers::my_vector<T>::operator[](std::size_t) const [with T = MinimalClass; std::size_t = long unsigned int]’: src/main.cpp:315:25: required from ‘void test_index_operator() [with T = MinimalClass]’ src/main.cpp:865:43: required from here include/my_vector_impl.h:173:10: error: no match for ‘operator*’ (operand type is ‘MinimalClass’)
Давай ты доведешь посылку до собирающегося состояния, и тогда я у тебя её проверю.
comment:4 Changed 3 years ago by
Resolution: | → задача сдана |
---|---|
Status: | assigned → closed |
Забыл обновить тикет.
И опять не собралось D:
In file included from include/my_vector.h:47, from src/main.cpp:3: include/my_vector_impl.h: In instantiation of ‘T containers::my_vector<T>::operator[](std::size_t) const [with T = int; std::size_t = long unsigned int]’: src/main.cpp:315:25: required from ‘void test_index_operator() [with T = int]’ src/main.cpp:863:34: required from here include/my_vector_impl.h:173:10: error: invalid type argument of unary ‘*’ (have ‘int’) 173 | T ans = *array_[index]; | ^~~~~~~~ include/my_vector_impl.h: In instantiation of ‘T containers::my_vector<T>::operator[](std::size_t) const [with T = Product; std::size_t = long unsigned int]’: src/main.cpp:315:25: required from ‘void test_index_operator() [with T = Product]’ src/main.cpp:864:38: required from here include/my_vector_impl.h:173:10: error: no match for ‘operator*’ (operand type is ‘Product’) include/my_vector_impl.h: In instantiation of ‘T containers::my_vector<T>::operator[](std::size_t) const [with T = MinimalClass; std::size_t = long unsigned int]’: src/main.cpp:315:25: required from ‘void test_index_operator() [with T = MinimalClass]’ src/main.cpp:865:43: required from here include/my_vector_impl.h:173:10: error: no match for ‘operator*’ (operand type is ‘MinimalClass’) make: *** [makefile:17: obj/main.o] Error 1
Падают тесты на инициализацию, на ресайз и валгринд детектит чет нехорошие на clear. Гарантий исключений снова нет :(
7/10 остается
Note: See
TracTickets for help on using
tickets.
Не компилируется.
<iostream>
в данном случае)clear
Пришлось чинить руками :-/
Тесты:
resize
при изменении размера в большую сторону должен заполнять хвост вектора пустыми элементами, а при изменении в меньшую -- разрушать объекты. У тебя он не делает ни то ни другое.7/10 пока что