In file included from main.cpp:2:0:
SmartPointer.hpp: In member function 'bool smart_pointer::SmartPointer<T, Allocator>::operator==(const smart_pointer::SmartPointer<U, AnotherAllocator>&) const [with U = float; AnotherAllocator = std::allocator<float>; T = float; Allocator = std::allocator<float>]':
SmartPointer.hpp:124:50: error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
return (reinterpret_cast<void*>(this->get()) ==
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
reinterpret_cast<void*>(other.get()) ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
(!this && !other));
~~~~~~~~~~~~~~~~~~
SmartPointer.hpp: In member function 'bool smart_pointer::SmartPointer<T, Allocator>::operator!=(const smart_pointer::SmartPointer<U, AnotherAllocator>&) const [with U = float; AnotherAllocator = std::allocator<float>; T = float; Allocator = std::allocator<float>]':
SmartPointer.hpp:131:16: error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
return !(reinterpret_cast<void*>(this->get()) ==
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
reinterpret_cast<void*>(other.get()) ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(!this && !other));
~~~~~~~~~~~~~~~~~~
SmartPointer.hpp: In member function 'bool smart_pointer::SmartPointer<T, Allocator>::operator==(const smart_pointer::SmartPointer<U, AnotherAllocator>&) const [with U = long unsigned int; AnotherAllocator = std::allocator<long unsigned int>; T = float; Allocator = std::allocator<float>]':
SmartPointer.hpp:124:50: error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
return (reinterpret_cast<void*>(this->get()) ==
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
reinterpret_cast<void*>(other.get()) ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
(!this && !other));
~~~~~~~~~~~~~~~~~~
SmartPointer.hpp: In member function 'bool smart_pointer::SmartPointer<T, Allocator>::operator!=(const smart_pointer::SmartPointer<U, AnotherAllocator>&) const [with U = long unsigned int; AnotherAllocator = std::allocator<long unsigned int>; T = float; Allocator = std::allocator<float>]':
SmartPointer.hpp:131:16: error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
return !(reinterpret_cast<void*>(this->get()) ==
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
reinterpret_cast<void*>(other.get()) ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(!this && !other));
~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
|