1void definitely_aborts() { __builtin_verbose_trap("User", "Invariant violated"); }
2
3namespace std {
4void aborts_soon() { definitely_aborts(); }
5} // namespace std
6
7void g() { std::aborts_soon(); }
8
9namespace std {
10namespace detail {
11void eventually_aborts() { g(); }
12} // namespace detail
13
14inline namespace __1 {
15void eventually_aborts() { detail::eventually_aborts(); }
16} // namespace __1
17} // namespace std
18
19int main() {
20 std::eventually_aborts();
21 return 0;
22}
23

Provided by KDAB

Privacy Policy
Update your C++ knowledge – Modern C++11/14/17 Training
Find out more

source code of lldb/test/Shell/Recognizer/Inputs/verbose_trap-in-stl-callback-user-leaf.cpp