What does this program print?

from RAII
C++23 (GCC 13.3.0) intermediate 2 min

What does this program print?

C++
#include <iostream>
#include <stdexcept>

struct Guard {
    int id;
    Guard(int value) : id(value) { std::cout << "+" << id << '\n'; }
    ~Guard() { std::cout << "-" << id << '\n'; }
};

void run() {
    Guard first(1);
    Guard second(2);
    throw std::runtime_error("stop");
}

int main() {
    try { run(); }
    catch (const std::exception&) { std::cout << "caught\n"; }
}
Open in playground
Report an error