Creating a pointer to an SDL\_Window struct and assigning it to a shared\_ptr, the mentioned error results. 

Part of the class:

```
#include <SDL2/SDL.h>

class Application {
    static std::shared_ptr<SDL_Window> window;
}

```

Definition:

```
#include "Application.h"
std::shared_ptr<SDL_Window> Application::window{};

bool Application::init() {  
    SDL_Window *window_ = nullptr;
    if((window_ = SDL_CreateWindow(title.c_str(),
                                  SDL_WINDOWPOS_UNDEFINED,
                                  SDL_WINDOWPOS_UNDEFINED,
                                  window_width,
                                  window_height,
                                  NULL)
        ) == nullptr) {
        std::cerr << "creating window failed: " << SDL_GetError() << std::endl;
    }

    window.reset(window_);
}

```

The error appears at 'window.reset()'. What is the reason and how to fix this behavior?