I am confused with Multiset/Set Upper_bound. Need help

Hello. Let’s say I have a multiset with elements, 1 2 3 5 8. If I do

    #include <iostream>
    #include <set>
    using namespace std;

    int main(){
        multiset<int> towers;
        towers.insert(1);
        towers.insert(5);
        towers.insert(2);
        towers.insert(3);
        towers.insert(8);
        auto it = towers.upper_bound(7);
        if (it == towers.end())
            cout << 1 << endl;
    }

It outputs 1. How does it output 1 if .end() refers to the element after the last?

^

Nevermind. Turns out it does not output 1. I was confused because the compiler output 1. However, after I tried it again it did not.