ID 5769651
Пользователь Корягин Роман Сергеевич
Время 13:30<< 14.11.2021 13:30 (25 д. 11:30) 13:31>>
Обработка 13:30 ... 13:30 (6,25 сек.)
Файл 5769651.cpp (CLang++ 5.0.0 + Address Sanitizer)
Турнир 2 курс. Программирование на C++. Турнир 2, осень 2021
Задача C: Smart Pointer
Набор тестов
Ограничения Время: 25с Память: 512Мб
Состояние  [?]
CE Ошибка компиляции
код | результаты
In file included from main.cpp:2:0:
SmartPointer.hpp:131:2: error: #endif without #if
 #endif
  ^~~~~
SmartPointer.hpp:11:1: error: 'ENABLE_CLASS_TESTS' does not name a type; did you mean 'ENABLE_TESTS'?
 ENABLE_CLASS_TESTS;
 ^~~~~~~~~~~~~~~~~~
 ENABLE_TESTS
In file included from main.cpp:3:0:
Test_SmartPointer.hpp: In function 'std::enable_if_t<std::is_floating_point<_Tp>::value> __stress_tests__SmartPointer_operator_star(const string&)':
Test_SmartPointer.hpp:17:5: error: there are no arguments to 'TEST_BLOCK' that depend on a template parameter, so a declaration of 'TEST_BLOCK' must be available [-fpermissive]
     TEST_BLOCK("[stress] SmartPointer[non-nullptr]::operator*() const") {
     ^~~~~~~~~~
Test_SmartPointer.hpp:17:5: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
Test_SmartPointer.hpp:17:73: error: expected ';' before '{' token
     TEST_BLOCK("[stress] SmartPointer[non-nullptr]::operator*() const") {
                                                                         ^
Test_SmartPointer.hpp:33:5: error: there are no arguments to 'TEST_BLOCK' that depend on a template parameter, so a declaration of 'TEST_BLOCK' must be available [-fpermissive]
     TEST_BLOCK("[stress] SmartPointer[non-nullptr]::operator*()") {
     ^~~~~~~~~~
Test_SmartPointer.hpp:33:67: error: expected ';' before '{' token
     TEST_BLOCK("[stress] SmartPointer[non-nullptr]::operator*()") {
                                                                   ^
Test_SmartPointer.hpp: In function 'std::enable_if_t<std::is_integral<_Tp>::value> __stress_tests__SmartPointer_operator_star(const string&)':
Test_SmartPointer.hpp:55:5: error: there are no arguments to 'TEST_BLOCK' that depend on a template parameter, so a declaration of 'TEST_BLOCK' must be available [-fpermissive]
     TEST_BLOCK("[stress] SmartPointer[non-nullptr]::operator*() const") {
     ^~~~~~~~~~
Test_SmartPointer.hpp:55:73: error: expected ';' before '{' token
     TEST_BLOCK("[stress] SmartPointer[non-nullptr]::operator*() const") {
                                                                         ^
In file included from main.cpp:3:0:
Test_SmartPointer.hpp:71:5: error: there are no arguments to 'TEST_BLOCK' that depend on a template parameter, so a declaration of 'TEST_BLOCK' must be available [-fpermissive]
     TEST_BLOCK("[stress] SmartPointer[non-nullptr]::operator*()") {
     ^~~~~~~~~~
Test_SmartPointer.hpp:71:67: error: expected ';' before '{' token
     TEST_BLOCK("[stress] SmartPointer[non-nullptr]::operator*()") {
                                                                   ^
Test_SmartPointer.hpp: At global scope:
Test_SmartPointer.hpp:97:40: error: ISO C++ forbids declaration of 'DEFINE_CLASS_TESTS' with no type [-fpermissive]
 DEFINE_CLASS_TESTS(SmartPointer__type_t) {
                                        ^
Test_SmartPointer.hpp: In function 'int DEFINE_CLASS_TESTS(SmartPointer__type_t)':
Test_SmartPointer.hpp:98:5: error: 'TEST_BLOCK' was not declared in this scope
     TEST_BLOCK("sizeof(SmartPointer)") {
     ^~~~~~~~~~
Test_SmartPointer.hpp:98:5: note: suggested alternative: 'EDEADLOCK'
     TEST_BLOCK("sizeof(SmartPointer)") {
     ^~~~~~~~~~
     EDEADLOCK
Test_SmartPointer.hpp:247:82: error: 'classname' was not declared in this scope
     __stress_tests__SmartPointer_operator_star<SmartPointer__type_t::value_type>(classname);
                                                                                  ^~~~~~~~~
Test_SmartPointer.hpp:247:82: note: suggested alternative: 'ptsname'
     __stress_tests__SmartPointer_operator_star<SmartPointer__type_t::value_type>(classname);
                                                                                  ^~~~~~~~~
                                                                                  ptsname
Test_SmartPointer.hpp:419:1: error: no return statement in function returning non-void [-Werror=return-type]
 }
 ^
main.cpp: In function 'int main()':
main.cpp:6:44: error: expected primary-expression before ')' token
     EXECUTE_CLASS_TEST(SmartPointer__type_t);
                                            ^
main.cpp:6:5: error: 'EXECUTE_CLASS_TEST' was not declared in this scope
     EXECUTE_CLASS_TEST(SmartPointer__type_t);
     ^~~~~~~~~~~~~~~~~~
main.cpp:6:5: note: suggested alternative: 'DEFINE_CLASS_TESTS'
     EXECUTE_CLASS_TEST(SmartPointer__type_t);
     ^~~~~~~~~~~~~~~~~~
     DEFINE_CLASS_TESTS
main.cpp:7:7: error: 'cout' is not a member of 'std'
  std::cout << 1 << std::endl;
       ^~~~
main.cpp:7:7: note: suggested alternative: 'cbrt'
  std::cout << 1 << std::endl;
       ^~~~
       cbrt
main.cpp:7:25: error: 'endl' is not a member of 'std'
  std::cout << 1 << std::endl;
                         ^~~~
main.cpp:7:25: note: suggested alternative: 'end'
  std::cout << 1 << std::endl;
                         ^~~~
                         end
cc1plus: all warnings being treated as errors
[печатать | |
]
(2 674 b)
0.050s 0.009s 10