In file included from main.cpp:2:0:
SmartPointer.hpp:81:2: error: expected ';' after class definition
}
^
;
SmartPointer.hpp: In constructor 'smart_pointer::SmartPointer<T, Allocator>::SmartPointer(smart_pointer::SmartPointer<T, Allocator>::value_type*)':
SmartPointer.hpp:26:18: error: expected type-specifier before 'Core'
this->core = new Core();
^~~~
SmartPointer.hpp:26:18: error: expected ';' before 'Core'
SmartPointer.hpp: In member function 'smart_pointer::SmartPointer<T, Allocator>& smart_pointer::SmartPointer<T, Allocator>::operator=(smart_pointer::SmartPointer<T, Allocator>::value_type*)':
SmartPointer.hpp:73:18: error: expected type-specifier before 'Core'
this->core = new Core();
^~~~
SmartPointer.hpp:73:18: error: expected ';' before 'Core'
SmartPointer.hpp: At global scope:
SmartPointer.hpp:82:14: error: expected class-name before '(' token
~SmartPointer() {
^
SmartPointer.hpp:90:1: error: 'value_type' does not name a type
value_type &operator*() {
^~~~~~~~~~
SmartPointer.hpp:97:7: error: 'value_type' does not name a type
const value_type &operator*() const {
^~~~~~~~~~
SmartPointer.hpp:104:1: error: 'value_type' does not name a type
value_type *operator->() const {
^~~~~~~~~~
SmartPointer.hpp:111:1: error: 'value_type' does not name a type
value_type *get() const {
^~~~~~~~~~
SmartPointer.hpp:118:17: error: non-member function 'smart_pointer::operator bool()' cannot have cv-qualifier
operator bool() const {
^~~~~
SmartPointer.hpp:118:17: error: 'smart_pointer::operator bool()' must be a nonstatic member function
SmartPointer.hpp:126:64: error: non-member function 'bool smart_pointer::operator==(const smart_pointer::SmartPointer<U, AnotherAllocator>&)' cannot have cv-qualifier
bool operator==(const SmartPointer<U, AnotherAllocator> & ptr) const {
^~~~~
SmartPointer.hpp:126:64: error: 'bool smart_pointer::operator==(const smart_pointer::SmartPointer<U, AnotherAllocator>&)' must take exactly two arguments
SmartPointer.hpp:130:64: error: non-member function 'bool smart_pointer::operator!=(const smart_pointer::SmartPointer<U, AnotherAllocator>&)' cannot have cv-qualifier
bool operator!=(const SmartPointer<U, AnotherAllocator> & ptr) const {
^~~~~
SmartPointer.hpp:130:64: error: 'bool smart_pointer::operator!=(const smart_pointer::SmartPointer<U, AnotherAllocator>&)' must take exactly two arguments
SmartPointer.hpp:133:28: error: non-member function 'std::size_t smart_pointer::count_owners()' cannot have cv-qualifier
std::size_t count_owners() const {
^~~~~
SmartPointer.hpp: In function 'std::size_t smart_pointer::count_owners()':
SmartPointer.hpp:134:5: error: invalid use of 'this' in non-member function
if (this->core != nullptr) {
^~~~
SmartPointer.hpp:135:8: error: invalid use of 'this' in non-member function
return this->core->count;
^~~~
SmartPointer.hpp: At global scope:
SmartPointer.hpp:141:2: error: expected unqualified-id before 'private'
private:
^~~~~~~
SmartPointer.hpp:152:1: error: 'Core' does not name a type
Core *core;
^~~~
SmartPointer.hpp:154:1: error: expected declaration before '}' token
}
^
|