In file included from main.cpp:2:0:
SmartPointer.hpp: In instantiation of 'smart_pointer::SmartPointer<T, Allocator>::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:95:19: error: no matching function for call to 'smart_pointer::exception::exception(const char [4])'
throw exception("fgr");
^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/exception:38:0,
from /usr/include/c++/7/new:40,
from /usr/include/c++/7/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/7/bits/c++allocator.h:33,
from /usr/include/c++/7/bits/allocator.h:46,
from /usr/include/c++/7/memory:63,
from SmartPointer.hpp:2,
from main.cpp:2:
/usr/include/c++/7/bits/exception.h:60:9: note: candidate: constexpr std::exception::exception(const std::exception&)
class exception
^~~~~~~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:10:23: note: inherited here
using base_class::base_class;
^~~~~~~~~~
SmartPointer.hpp:10:23: note: an inherited constructor is not a candidate for initialization from an expression of the same or derived type
SmartPointer.hpp:8:7: note: candidate: smart_pointer::exception::exception()
class exception : std::exception {
^~~~~~~~~
SmartPointer.hpp:8:7: note: candidate expects 0 arguments, 1 provided
SmartPointer.hpp:8:7: note: candidate: constexpr smart_pointer::exception::exception(const smart_pointer::exception&)
SmartPointer.hpp:8:7: note: no known conversion for argument 1 from 'const char [4]' to 'const smart_pointer::exception&'
SmartPointer.hpp:8:7: note: candidate: constexpr smart_pointer::exception::exception(smart_pointer::exception&&)
SmartPointer.hpp:8:7: note: no known conversion for argument 1 from 'const char [4]' to 'smart_pointer::exception&&'
SmartPointer.hpp: In instantiation of 'smart_pointer::SmartPointer<T, Allocator>::value_type& smart_pointer::SmartPointer<T, Allocator>::operator*() [with T = float; Allocator = std::allocator<float>; smart_pointer::SmartPointer<T, Allocator>::value_type = float]':
Test_SmartPointer.hpp:238:9: required from here
SmartPointer.hpp:88:19: error: no matching function for call to 'smart_pointer::exception::exception(const char [4])'
throw exception("dfs");
^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/exception:38:0,
from /usr/include/c++/7/new:40,
from /usr/include/c++/7/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/7/bits/c++allocator.h:33,
from /usr/include/c++/7/bits/allocator.h:46,
from /usr/include/c++/7/memory:63,
from SmartPointer.hpp:2,
from main.cpp:2:
/usr/include/c++/7/bits/exception.h:60:9: note: candidate: constexpr std::exception::exception(const std::exception&)
class exception
^~~~~~~~~
In file included from main.cpp:2:0:
SmartPointer.hpp:10:23: note: inherited here
using base_class::base_class;
^~~~~~~~~~
SmartPointer.hpp:10:23: note: an inherited constructor is not a candidate for initialization from an expression of the same or derived type
SmartPointer.hpp:8:7: note: candidate: smart_pointer::exception::exception()
class exception : std::exception {
^~~~~~~~~
SmartPointer.hpp:8:7: note: candidate expects 0 arguments, 1 provided
SmartPointer.hpp:8:7: note: candidate: constexpr smart_pointer::exception::exception(const smart_pointer::exception&)
SmartPointer.hpp:8:7: note: no known conversion for argument 1 from 'const char [4]' to 'const smart_pointer::exception&'
SmartPointer.hpp:8:7: note: candidate: constexpr smart_pointer::exception::exception(smart_pointer::exception&&)
SmartPointer.hpp:8:7: note: no known conversion for argument 1 from 'const char [4]' to 'smart_pointer::exception&&'
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:125:16: error: invalid static_cast from type 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* const' to type 'int'
return static_cast<int>(this->core) ==
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
SmartPointer.hpp:126:13: error: invalid static_cast from type 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* const' to type 'int'
static_cast<int>(otherPointer.core);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:125:16: error: invalid static_cast from type 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* const' to type 'int'
return static_cast<int>(this->core) ==
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
SmartPointer.hpp:126:13: error: invalid static_cast from type 'smart_pointer::SmartPointer<long unsigned int, std::allocator<long unsigned int> >::Core* const' to type 'int'
static_cast<int>(otherPointer.core);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:134:20: error: invalid static_cast from type 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* const' to type 'int'
return static_cast<int>(this->core) !=
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
SmartPointer.hpp:135:17: error: invalid static_cast from type 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* const' to type 'int'
static_cast<int>(otherPointer.core);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:134:20: error: invalid static_cast from type 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core* const' to type 'int'
return static_cast<int>(this->core) !=
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
SmartPointer.hpp:135:17: error: invalid static_cast from type 'smart_pointer::SmartPointer<long unsigned int, std::allocator<long unsigned int> >::Core* const' to type 'int'
static_cast<int>(otherPointer.core);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SmartPointer.hpp: In member function 'smart_pointer::SmartPointer<T, Allocator>::value_type& smart_pointer::SmartPointer<T, Allocator>::operator*() [with T = float; Allocator = std::allocator<float>]':
SmartPointer.hpp:92:5: error: control reaches end of non-void function [-Werror=return-type]
}
^
SmartPointer.hpp: In member function 'smart_pointer::SmartPointer<T, Allocator>::value_type& smart_pointer::SmartPointer<T, Allocator>::operator*() const [with T = float; Allocator = std::allocator<float>]':
SmartPointer.hpp:99:5: error: control reaches end of non-void function [-Werror=return-type]
}
^
cc1plus: all warnings being treated as errors
|