I think that sections like this can be simplified to:

    spec.attribute (oname, bx, &b2iattr->value());

without the need to copy to box.