What is the purpose of this case label?

142 Views Asked by At

Inside boost/asio/coroutine.hpp there is case statement inside the definition of the macro yield which seems to be inaccessible:

  switch (_coro_value ? 0 : 1) \
    for (;;) \
      case -1: if (_coro_value) \
        goto terminate_coroutine; \
      else for (;;) \
        case 1: if (_coro_value) \
          goto bail_out_of_coroutine; \
        else case 0:

What is the purpose of case -1 since the switched value can only be either 0 or 1?

0

There are 0 best solutions below