ID 5787161
Пользователь Росляков Владимир Олегович
Время 20:50<< 16.11.2021 20:50 (27 д. 18:51) 20:52>>
Обработка 20:50 ... 20:50 (3,59 сек.)
Файл 5787161.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: In constructor 'smart_pointer::SmartPointer<T, Allocator>::Core::Core(smart_pointer::SmartPointer<T, Allocator>::value_type*)':
SmartPointer.hpp:130:40: error: class 'smart_pointer::SmartPointer<T, Allocator>::Core' does not have any field named 'value_'
     explicit Core(value_type *value) : value_(value), count_owners_(0) {
                                        ^~~~~~
SmartPointer.hpp:130:55: error: class 'smart_pointer::SmartPointer<T, Allocator>::Core' does not have any field named 'count_owners_'
     explicit Core(value_type *value) : value_(value), count_owners_(0) {
                                                       ^~~~~~~~~~~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp: In function 'void test::test(const string&) [with __TEST_CLASSNAME__ = smart_pointer::SmartPointer<float, std::allocator<float> >; std::__cxx11::string = std::__cxx11::basic_string<char>]':
Test_SmartPointer.hpp:99:77: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sizeof(SmartPointer__type_t) == sizeof(SmartPointer__type_t::core));
                                                                             ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:104:21: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr.core == nullptr);
                     ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:110:21: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr.core != nullptr);
                     ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:115:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr2.core == nullptr);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:120:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr1.core != nullptr);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:121:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr2.core == sptr1.core);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:121:36: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr2.core == sptr1.core);
                                    ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:126:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr1.core == nullptr);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:127:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr2.core == nullptr);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:133:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr1.core == nullptr);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:134:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr2.core != nullptr);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:140:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr1.core == nullptr);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:141:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr2.core == nullptr);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:148:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr1.core == nullptr);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:149:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr2.core == nullptr);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:156:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr1.core != nullptr);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:157:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr2.core == sptr1.core);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:157:36: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr2.core == sptr1.core);
                                    ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:165:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr1.core != nullptr);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:166:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr2.core == sptr1.core);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:166:36: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr2.core == sptr1.core);
                                    ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:179:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr1.core != nullptr);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:180:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr2.core == sptr1.core);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:180:36: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr2.core == sptr1.core);
                                    ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:188:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr1.core == nullptr);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:189:22: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr2.core != nullptr);
                      ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:195:21: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr.core == nullptr);
                     ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:201:21: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr.core == nullptr);
                     ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:208:21: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr.core != nullptr);
                     ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:215:21: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
         ASSERT(sptr.core != nullptr);
                     ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from SmartPointer.hpp:4:0,
                 from main.cpp:2:
Test_SmartPointer.hpp:224:25: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
             ASSERT(sptr.core != nullptr);
                         ^
Test.hpp:39:28: note: in definition of macro 'ASSERT'
     if (!static_cast<bool>(EXPR)) { \
                            ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
In file included from main.cpp:3:0:
Test_SmartPointer.hpp:225:24: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* smart_pointer::SmartPointer<float, std::allocator<float> >::core' is private within this context
             if (!(sptr.core != nullptr)) {
                        ^~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:159:9: note: declared private here
   Core *core;
         ^~~~
SmartPointer.hpp: In instantiation of 'void smart_pointer::SmartPointer<T, Allocator>::Core::Decrement() [with T = float; Allocator = std::allocator<float>]':
SmartPointer.hpp:67:7:   required from 'smart_pointer::SmartPointer<T, Allocator>::~SmartPointer() [with T = float; Allocator = std::allocator<float>]'
Test_SmartPointer.hpp:103:30:   required from here
SmartPointer.hpp:152:7: error: invalid use of non-static data member 'smart_pointer::SmartPointer<float, std::allocator<float> >::count_owners_'
       count_owners_--;
       ^~~~~~~~~~~~~
SmartPointer.hpp:19:15: note: declared here
   std::size_t count_owners_;
               ^~~~~~~~~~~~~
SmartPointer.hpp: In instantiation of 'std::size_t smart_pointer::SmartPointer<T, Allocator>::Core::CountOwners() const [with T = float; Allocator = std::allocator<float>; std::size_t = long unsigned int]':
SmartPointer.hpp:68:31:   required from 'smart_pointer::SmartPointer<T, Allocator>::~SmartPointer() [with T = float; Allocator = std::allocator<float>]'
Test_SmartPointer.hpp:103:30:   required from here
SmartPointer.hpp:156:14: error: invalid use of non-static data member 'smart_pointer::SmartPointer<float, std::allocator<float> >::count_owners_'
       return count_owners_;
              ^~~~~~~~~~~~~
SmartPointer.hpp:19:15: note: declared here
   std::size_t count_owners_;
               ^~~~~~~~~~~~~
SmartPointer.hpp: In instantiation of 'smart_pointer::SmartPointer<T, Allocator>::Core::~Core() [with T = float; Allocator = std::allocator<float>]':
SmartPointer.hpp:69:9:   required from 'smart_pointer::SmartPointer<T, Allocator>::~SmartPointer() [with T = float; Allocator = std::allocator<float>]'
Test_SmartPointer.hpp:103:30:   required from here
SmartPointer.hpp:135:14: error: invalid use of non-static data member 'smart_pointer::SmartPointer<float, std::allocator<float> >::value_'
       delete value_;
              ^~~~~~
SmartPointer.hpp:18:15: note: declared here
   value_type *value_;
               ^~~~~~
SmartPointer.hpp:136:7: error: invalid use of non-static data member 'smart_pointer::SmartPointer<float, std::allocator<float> >::value_'
       value_ = nullptr;
       ^~~~~~
SmartPointer.hpp:18:15: note: declared here
   value_type *value_;
               ^~~~~~
SmartPointer.hpp: In instantiation of 'void smart_pointer::SmartPointer<T, Allocator>::Core::Increment() [with T = float; Allocator = std::allocator<float>]':
SmartPointer.hpp:33:7:   required from 'smart_pointer::SmartPointer<T, Allocator>::SmartPointer(const smart_pointer::SmartPointer<T, Allocator>&) [with T = float; Allocator = std::allocator<float>]'
Test_SmartPointer.hpp:114:48:   required from here
SmartPointer.hpp:148:7: error: invalid use of non-static data member 'smart_pointer::SmartPointer<float, std::allocator<float> >::count_owners_'
       count_owners_++;
       ^~~~~~~~~~~~~
SmartPointer.hpp:19:15: note: declared here
   std::size_t count_owners_;
               ^~~~~~~~~~~~~
SmartPointer.hpp: In instantiation of 'smart_pointer::SmartPointer<T, Allocator>::value_type* smart_pointer::SmartPointer<T, Allocator>::Core::Value() [with T = float; Allocator = std::allocator<float>; smart_pointer::SmartPointer<T, Allocator>::value_type = float]':
SmartPointer.hpp:82:12:   required from 'const value_type& smart_pointer::SmartPointer<T, Allocator>::operator*() const [with T = float; Allocator = std::allocator<float>; smart_pointer::SmartPointer<T, Allocator>::value_type = float]'
Test_SmartPointer.hpp:233:9:   required from here
SmartPointer.hpp:140:14: error: invalid use of non-static data member 'smart_pointer::SmartPointer<float, std::allocator<float> >::value_'
       return value_;
              ^~~~~~
SmartPointer.hpp:18:15: note: declared here
   value_type *value_;
               ^~~~~~
SmartPointer.hpp: In instantiation of 'void smart_pointer::SmartPointer<T, Allocator>::Core::Decrement() [with T = long unsigned int; Allocator = std::allocator<long unsigned int>]':
SmartPointer.hpp:67:7:   required from 'smart_pointer::SmartPointer<T, Allocator>::~SmartPointer() [with T = long unsigned int; Allocator = std::allocator<long unsigned int>]'
Test_SmartPointer.hpp:304:38:   required from here
SmartPointer.hpp:152:7: error: invalid use of non-static data member 'smart_pointer::SmartPointer<long unsigned int, std::allocator<long unsigned int> >::count_owners_'
       count_owners_--;
       ^~~~~~~~~~~~~
SmartPointer.hpp:19:15: note: declared here
   std::size_t count_owners_;
               ^~~~~~~~~~~~~
SmartPointer.hpp: In instantiation of 'std::size_t smart_pointer::SmartPointer<T, Allocator>::Core::CountOwners() const [with T = long unsigned int; Allocator = std::allocator<long unsigned int>; std::size_t = long unsigned int]':
SmartPointer.hpp:68:31:   required from 'smart_pointer::SmartPointer<T, Allocator>::~SmartPointer() [with T = long unsigned int; Allocator = std::allocator<long unsigned int>]'
Test_SmartPointer.hpp:304:38:   required from here
SmartPointer.hpp:156:14: error: invalid use of non-static data member 'smart_pointer::SmartPointer<long unsigned int, std::allocator<long unsigned int> >::count_owners_'
       return count_owners_;
              ^~~~~~~~~~~~~
SmartPointer.hpp:19:15: note: declared here
   std::size_t count_owners_;
               ^~~~~~~~~~~~~
SmartPointer.hpp: In instantiation of 'smart_pointer::SmartPointer<T, Allocator>::Core::~Core() [with T = long unsigned int; Allocator = std::allocator<long unsigned int>]':
SmartPointer.hpp:69:9:   required from 'smart_pointer::SmartPointer<T, Allocator>::~SmartPointer() [with T = long unsigned int; Allocator = std::allocator<long unsigned int>]'
Test_SmartPointer.hpp:304:38:   required from here
SmartPointer.hpp:135:14: error: invalid use of non-static data member 'smart_pointer::SmartPointer<long unsigned int, std::allocator<long unsigned int> >::value_'
       delete value_;
              ^~~~~~
SmartPointer.hpp:18:15: note: declared here
   value_type *value_;
               ^~~~~~
SmartPointer.hpp:136:7: error: invalid use of non-static data member 'smart_pointer::SmartPointer<long unsigned int, std::allocator<long unsigned int> >::value_'
       value_ = nullptr;
       ^~~~~~
SmartPointer.hpp:18:15: note: declared here
   value_type *value_;
               ^~~~~~
SmartPointer.hpp: In instantiation of 'void smart_pointer::SmartPointer<T, Allocator>::Core::Increment() [with T = long unsigned int; Allocator = std::allocator<long unsigned int>]':
SmartPointer.hpp:131:16:   required from 'smart_pointer::SmartPointer<T, Allocator>::Core::Core(smart_pointer::SmartPointer<T, Allocator>::value_type*) [with T = long unsigned int; Allocator = std::allocator<long unsigned int>; smart_pointer::SmartPointer<T, Allocator>::value_type = long unsigned int]'
SmartPointer.hpp:24:14:   required from 'smart_pointer::SmartPointer<T, Allocator>::SmartPointer(smart_pointer::SmartPointer<T, Allocator>::value_type*) [with T = long unsigned int; Allocator = std::allocator<long unsigned int>; smart_pointer::SmartPointer<T, Allocator>::value_type = long unsigned int]'
Test_SmartPointer.hpp:304:38:   required from here
SmartPointer.hpp:148:7: error: invalid use of non-static data member 'smart_pointer::SmartPointer<long unsigned int, std::allocator<long unsigned int> >::count_owners_'
       count_owners_++;
       ^~~~~~~~~~~~~
SmartPointer.hpp:19:15: note: declared here
   std::size_t count_owners_;
               ^~~~~~~~~~~~~
SmartPointer.hpp: In instantiation of 'smart_pointer::SmartPointer<T, Allocator>::value_type* smart_pointer::SmartPointer<T, Allocator>::Core::Value() [with T = long unsigned int; Allocator = std::allocator<long unsigned int>; smart_pointer::SmartPointer<T, Allocator>::value_type = long unsigned int]':
SmartPointer.hpp:99:47:   required from 'smart_pointer::SmartPointer<T, Allocator>::operator bool() const [with T = long unsigned int; Allocator = std::allocator<long unsigned int>]'
SmartPointer.hpp:66:5:   required from 'smart_pointer::SmartPointer<T, Allocator>::~SmartPointer() [with T = long unsigned int; Allocator = std::allocator<long unsigned int>]'
Test_SmartPointer.hpp:304:38:   required from here
SmartPointer.hpp:140:14: error: invalid use of non-static data member 'smart_pointer::SmartPointer<long unsigned int, std::allocator<long unsigned int> >::value_'
       return value_;
              ^~~~~~
SmartPointer.hpp:18:15: note: declared here
   value_type *value_;
               ^~~~~~
[печатать | |
]
(3 278 b)
0.096s 0.010s 10