Perfect, I moved to the Window class and changed the raw sdl pointer and this time gave me an error differently than with other classes I changed without error, can you pinpoint me what I did wrong?
I changed this:
SDL_Window* window;
To this:
std::unique_ptr<SDL_Window, decltype(&SDL_DestroyWindow)> window;
Window.cpp: In constructor ‘Window::Window(const std::string&, int, int, int, int, const std::string&, bool, bool, bool)’:
Window.cpp:9:151: error: no matching function for call to ‘std::unique_ptr<SDL_Window, void ()(SDL_Window)>::unique_ptr()’
9 | Window::Window(const std::string& title, int x, int y, int width, int height, const std::string& iconPath, bool bordered, bool resizable, bool visible)
| ^
In file included from /usr/include/c++/13/memory:78,
from include/Window.h:6,
from Window.cpp:1:
/usr/include/c++/13/bits/unique_ptr.h:390:9: note: candidate: ‘template<class _Up, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(std::auto_ptr<_Up>&&) [with = _Up; _Tp = SDL_Window; _Dp = void ()(SDL_Window)]’
390 | unique_ptr(auto_ptr<_Up>&& __u) noexcept;
| ^~~~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:390:9: note: template argument deduction/substitution failed:
Window.cpp:9:151: note: candidate expects 1 argument, 0 provided
9 | Window::Window(const std::string& title, int x, int y, int width, int height, const std::string& iconPath, bool bordered, bool resizable, bool visible)
| ^
/usr/include/c++/13/bits/unique_ptr.h:380:9: note: candidate: ‘template<class _Up, class _Ep, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Ep = _Up; = _Ep; _Tp = SDL_Window; _Dp = void ()(SDL_Window)]’
380 | unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
| ^~~~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:380:9: note: template argument deduction/substitution failed:
Window.cpp:9:151: note: candidate expects 1 argument, 0 provided
9 | Window::Window(const std::string& title, int x, int y, int width, int height, const std::string& iconPath, bool bordered, bool resizable, bool visible)
| ^
/usr/include/c++/13/bits/unique_ptr.h:359:19: note: candidate: ‘template<class _Del, class> constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr(std::nullptr_t) [with = _Del; _Tp = SDL_Window; _Dp = void ()(SDL_Window)]’
359 | constexpr unique_ptr(nullptr_t) noexcept
| ^~~~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:359:19: note: template argument deduction/substitution failed:
Window.cpp:9:151: note: candidate expects 1 argument, 0 provided
9 | Window::Window(const std::string& title, int x, int y, int width, int height, const std::string& iconPath, bool bordered, bool resizable, bool visible)
| ^
/usr/include/c++/13/bits/unique_ptr.h:353:9: note: candidate: ‘template<class _Del, class _DelUnref> std::unique_ptr<_Tp, _Dp>::unique_ptr(pointer, std::__enable_if_t<std::is_lvalue_reference<_Del>::value, _DelUnref&&>) [with _DelUnref = _Del; _Tp = SDL_Window; _Dp = void ()]’ (deleted)
353 | unique_ptr(pointer,
| ^~~~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:353:9: note: template argument deduction/substitution failed:
Window.cpp:9:151: note: candidate expects 2 arguments, 0 provided
9 | Window::Window(const std::string& title, int x, int y, int width, int height, const std::string& iconPath, bool bordered, bool resizable, bool visible)
| ^
/usr/include/c++/13/bits/unique_ptr.h:344:9: note: candidate: ‘template<class _Del, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(pointer, std::__enable_if_t<(! std::is_lvalue_reference<_Del>::value), _Del&&>) [with = _Del; _Tp = SDL_Window; _Dp = void ()]’
344 | unique_ptr(pointer __p,
| ^~~~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:344:9: note: template argument deduction/substitution failed:
Window.cpp:9:151: note: candidate expects 2 arguments, 0 provided
9 | Window::Window(const std::string& title, int x, int y, int width, int height, const std::string& iconPath, bool bordered, bool resizable, bool visible)
| ^
/usr/include/c++/13/bits/unique_ptr.h:331:9: note: candidate: ‘template<class _Del, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(pointer, const deleter_type&) [with = _Del; _Tp = SDL_Window; _Dp = void ()]’
331 | unique_ptr(pointer __p, const deleter_type& __d) noexcept
| ^~~~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:331:9: note: template argument deduction/substitution failed:
Window.cpp:9:151: note: candidate expects 2 arguments, 0 provided
9 | Window::Window(const std::string& title, int x, int y, int width, int height, const std::string& iconPath, bool bordered, bool resizable, bool visible)
| ^
/usr/include/c++/13/bits/unique_ptr.h:317:9: note: candidate: ‘template<class _Del, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(pointer) [with = _Del; _Tp = SDL_Window; _Dp = void ()]’
317 | unique_ptr(pointer __p) noexcept
| ^~~~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:317:9: note: template argument deduction/substitution failed:
Window.cpp:9:151: note: candidate expects 1 argument, 0 provided
9 | Window::Window(const std::string& title, int x, int y, int width, int height, const std::string& iconPath, bool bordered, bool resizable, bool visible)
| ^
/usr/include/c++/13/bits/unique_ptr.h:304:19: note: candidate: ‘template<class _Del, class> constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr() [with = _Del; _Tp = SDL_Window; _Dp = void ()]’
304 | constexpr unique_ptr() noexcept
| ^~~~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:304:19: note: template argument deduction/substitution failed:
/usr/include/c++/13/bits/unique_ptr.h: In substitution of ‘template<class _Tp, class _Dp> template using std::unique_ptr<_Tp, _Dp>::_DeleterConstraint = typename std::__uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type [with _Up = void (); _Tp = SDL_Window; _Dp = void ()]’:
/usr/include/c++/13/bits/unique_ptr.h:303:37: required from here
/usr/include/c++/13/bits/unique_ptr.h:280:15: error: no type named ‘type’ in ‘using std::__uniq_ptr_impl<SDL_Window, void ()>::_DeleterConstraint = struct std::enable_if<false, void>’ {aka ‘struct std::enable_if<false, void>’}
280 | using _DeleterConstraint =
| ^~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:366:7: note: candidate: ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = SDL_Window; _Dp = void ()]’
366 | unique_ptr(unique_ptr&&) = default;
| ^~~~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:366:7: note: candidate expects 1 argument, 0 provided