Device Monitoring Studio - Monitor, log and analyze data coming through PC ports and connections
Download Device Monitoring Studio Hide this button

$remove_to Directive

Syntax:

$remove_to(reference-expression);

This directive removes one or more last bound fields until the referenced field. reference-expression is evaluated at run-time and must be a reference to a field in the current type.

WARNING

All fields being removed must be visible and no hidden fields must be between them.

struct A
{
    int type;
    switch (type)
    {
        case 0:
            B b;
            break;
        case 1:
            C c;
            break;
        default:
            $remove_to(ref(type));
            D d;
    }
};