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':
SmartPointer.hpp:140:3: error: expected ',' or ';' before 'return'
return exp1 || exp2;
^~~~~~
SmartPointer.hpp:141:1: error: no return statement in function returning non-void [-Werror=return-type]
}
^
SmartPointer.hpp: In member function 'bool smart_pointer::SmartPointer<T, Allocator>::operator!=(const smart_pointer::SmartPointer<U, AnotherAllocator>&) const':
SmartPointer.hpp:149:3: error: expected ',' or ';' before 'return'
return !(exp1 || exp2);
^~~~~~
SmartPointer.hpp:150:1: error: no return statement in function returning non-void [-Werror=return-type]
}
^
SmartPointer.hpp: In instantiation of '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>]':
Test_SmartPointer.hpp:299:9: required from here
SmartPointer.hpp:137:8: error: unused variable 'exp1' [-Werror=unused-variable]
auto exp1 = get() == nullptr && val.get() == nullptr;
^~~~
SmartPointer.hpp:138:8: error: unused variable 'exp2' [-Werror=unused-variable]
auto exp2 = static_cast<void*>(get()) == static_cast<void*>(val.get())
^~~~
SmartPointer.hpp: In instantiation of '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>]':
Test_SmartPointer.hpp:305:9: required from here
SmartPointer.hpp:137:8: error: unused variable 'exp1' [-Werror=unused-variable]
auto exp1 = get() == nullptr && val.get() == nullptr;
^~~~
SmartPointer.hpp:138:8: error: unused variable 'exp2' [-Werror=unused-variable]
auto exp2 = static_cast<void*>(get()) == static_cast<void*>(val.get())
^~~~
SmartPointer.hpp: In instantiation of '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>]':
Test_SmartPointer.hpp:349:9: required from here
SmartPointer.hpp:146:8: error: unused variable 'exp1' [-Werror=unused-variable]
auto exp1 = get() == nullptr && val.get() == nullptr;
^~~~
SmartPointer.hpp:147:8: error: unused variable 'exp2' [-Werror=unused-variable]
auto exp2 = static_cast<void*>(get()) == static_cast<void*>(val.get())
^~~~
SmartPointer.hpp: In instantiation of '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>]':
Test_SmartPointer.hpp:355:9: required from here
SmartPointer.hpp:146:8: error: unused variable 'exp1' [-Werror=unused-variable]
auto exp1 = get() == nullptr && val.get() == nullptr;
^~~~
SmartPointer.hpp:147:8: error: unused variable 'exp2' [-Werror=unused-variable]
auto exp2 = static_cast<void*>(get()) == static_cast<void*>(val.get())
^~~~
cc1plus: all warnings being treated as errors
|