Is there a way to cast std::any back to its original type without having to hard code it?

I know you can do

```
std::any_cast<int>(example)

```

But this requires you do already know that "example" is an int. I noticed that std::any stores the original type but I can't seem to find anyway to use it for casting. I want to do something like this:

```
static_cast<example.type()>(example);

```

Sorry if this is a bit of a basic question but I feel like this may just not be possible and wanted to check.